5 Replies Latest reply on Jan 2, 2009 4:48 AM by kconner

    Unresponsive EPR: InVMEpr

      Environment:

      JBossESB 4.4 running on JBoss AS 4.2.2

      EJBClient => SLSB (EJB3) => ServiceInvoker (local inVM) => CustomAction

      My SLSB is deployed as an EJB jar inside of the ESB archive.

      Problem:

      If my SLSB makes a synchronous call on ServiceInvoker I get the following error:

      16:48:22,104 WARN [InVMCourier] InVMCourier reset called on transactional courier: ignoring reset for the sake of consi
      stency!
      16:48:42,104 INFO [ServiceInvoker] Unresponsive EPR: InVMEpr [ PortReference < <wsa:Address invm://54424f54416464416765
      6e74/false?true#4000/>, <wsa:ReferenceProperties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jbossesb:lockstepW
      ait : 4000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jbos
      s/esb/epr/type/invm/> > ] for message: header: [ To: InVMEpr [ PortReference < <wsa:Address invm://54424f544164644167656
      e74/false?true#4000/>, <wsa:ReferenceProperties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jbossesb:lockstepWa
      it : 4000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss
      /esb/epr/type/invm/> > ] ReplyTo: InVMEpr [ PortReference < <wsa:Address invm://thread-164/>, <wsa:ReferenceProperties j
      bossesb:passByValue : false/> > ] ]
      16:49:02,104 INFO [ServiceInvoker] Unresponsive EPR: InVMEpr [ PortReference < <wsa:Address invm://54424f54416464416765
      6e74/false?true#4000/>, <wsa:ReferenceProperties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jbossesb:lockstepW
      ait : 4000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jbos
      s/esb/epr/type/invm/> > ] for message: header: [ To: InVMEpr [ PortReference < <wsa:Address invm://54424f544164644167656
      e74/false?true#4000/>, <wsa:ReferenceProperties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jbossesb:lockstepWa
      it : 4000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss
      /esb/epr/type/invm/> > ] ReplyTo: InVMEpr [ PortReference < <wsa:Address invm://thread-164/>, <wsa:ReferenceProperties j
      bossesb:passByValue : false/> > ] ]
      16:49:02,104 INFO [ServiceInvoker] Delivering message [header: [ To: InVMEpr [ PortReference < <wsa:Address invm://5442
      4f544164644167656e74/false?true#4000/>, <wsa:ReferenceProperties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jb
      ossesb:lockstepWait : 4000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/>, <wsa:ReferenceProperties jbossesb
      :type : urn:jboss/esb/epr/type/invm/> > ] ReplyTo: InVMEpr [ PortReference < <wsa:Address invm://thread-164/>, <wsa:Refe
      renceProperties jbossesb:passByValue : false/> > ] ]] to DLQ.
      16:49:02,151 INFO [STDOUT] org.jboss.soa.esb.listeners.message.MessageDeliverException: Failed to deliver message [head
      er: [ To: InVMEpr [ PortReference < <wsa:Address invm://54424f544164644167656e74/false?true#4000/>, <wsa:ReferenceProper
      ties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jbossesb:lockstepWait : 4000/>, <wsa:ReferenceProperties jboss
      esb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/invm/> > ] ReplyTo: InVMEpr [
       PortReference < <wsa:Address invm://thread-164/>, <wsa:ReferenceProperties jbossesb:passByValue : false/> > ] ]] to Ser
      vice [TBOT:AddAgent]. Check for errors.
      16:49:02,151 INFO [STDOUT] org.jboss.soa.esb.listeners.message.MessageDeliverException: Failed to deliver message [head
      er: [ To: InVMEpr [ PortReference < <wsa:Address invm://54424f544164644167656e74/false?true#4000/>, <wsa:ReferenceProper
      ties jbossesb:lockstep : true/>, <wsa:ReferenceProperties jbossesb:lockstepWait : 4000/>, <wsa:ReferenceProperties jboss
      esb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/invm/> > ] ReplyTo: InVMEpr [
       PortReference < <wsa:Address invm://thread-164/>, <wsa:ReferenceProperties jbossesb:passByValue : false/> > ] ]] to Ser
      vice [TBOT:AddAgent]. Check for errors.
      16:49:02,151 INFO [STDOUT] at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:361)
      16:49:02,151 INFO [STDOUT] at org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:198)
      16:49:02,151 INFO [STDOUT] at org.twia.ejb.TbotInputBean.addAgent(TbotInputBean.java:31)
      16:49:02,151 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:49:02,151 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      16:49:02,151 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      
      16:49:02,151 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      16:49:02,151 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      16:49:02,151 INFO [STDOUT] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:1
      66)
      16:49:02,151 INFO [STDOUT] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterce
      ptor.java:63)
      16:49:02,151 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,151 INFO [STDOUT] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionSco
      pedEntityManagerInterceptor.java:54)
      16:49:02,213 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,213 INFO [STDOUT] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:
      47)
      16:49:02,213 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,213 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      16:49:02,213 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      16:49:02,213 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,213 INFO [STDOUT] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95
      )
      16:49:02,245 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,245 INFO [STDOUT] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterce
      ptor.java:62)
      16:49:02,245 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,245 INFO [STDOUT] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor
      .java:77)
      16:49:02,245 INFO [STDOUT] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterc
      eptor.java:110)
      16:49:02,292 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,292 INFO [STDOUT] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      16:49:02,292 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,292 INFO [STDOUT] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.ja
      va:106)
      16:49:02,292 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      16:49:02,292 INFO [STDOUT] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304
      )
      16:49:02,292 INFO [STDOUT] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      16:49:02,338 INFO [STDOUT] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationH
      andler.java:82)
      16:49:02,338 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
      16:49:02,338 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:
      573)
      16:49:02,338 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
      16:49:02,338 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
      16:49:02,385 INFO [STDOUT]
      


      If my SLSB makes an asynchronous call on ServiceInvoker everything works ok.

      Is this a known limitation in JBossESB 4.4 or am I doing something wrong?

      My jboss-esb.xml config follows:

      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
       parameterReloadSecs="5">
      
       <services>
       <service category="TBOT"
       name="AddAgent"
       description="A EJB Frontend speaks natively to the ESB" invmScope="GLOBAL">
       <actions mep="OneWay">
       <action name="billingCenterOutputAction"
       class="org.twia.esb.BillingCenterOutputAction"
       process="addProducer">
       <property name="exceptionMethod" value="exceptionHandler"/>
       </action>
       </actions>
       </service>
       </services>
      
      </jbossesb>
      



        • 1. Re: Unresponsive EPR: InVMEpr
          tfennelly

          So are you making a synchronous (RequestResponse) request on a OneWay service? If that's the case, then it makes sense that your ServiceInvoker instance will timeout waiting on a response, because this is none with a OneWay service.

          • 2. Re: Unresponsive EPR: InVMEpr

            True, my posted config is explicit OneWay.

            So, I tried changing it to RequestResponse and got the same error on a synchronous call.

            Next I tried explicitly setting the ReplyTo EPR = To EPR. This resulted in the same error.

            Here is my native client code:

            @Stateless
            @Remote(TbotInput.class)
            public class TbotInputBean implements TbotInput
            {
            
             public void addAgent(String toWhom)
             {
             System.out.println("[TbotInputBean] addAgent() invoked.");
             try
             {
             ServiceInvoker deliveryAdapter;
             Message requestMessage;
             Message replyMessage;
             deliveryAdapter = new org.jboss.soa.esb.client.ServiceInvoker("TBOT", "AddAgent");
             requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
             requestMessage.getBody().add(toWhom);
             Call call = requestMessage.getHeader().getCall();
             call.setReplyTo(call.getTo());
            
             System.out.println("[TbotInputBean] delivering message.");
             // deliveryAdapter.deliverAsync(requestMessage);
            
             // TODO synchronous invocation is resulting in Unresponsive EPR error with a timeout
             replyMessage = deliveryAdapter.deliverSync(requestMessage, 20000);
             if (replyMessage != null)
             System.out.println("[TbotInputBean] reply message received: " + replyMessage.getBody().get());
            
             System.out.println("[TbotInputBean] message delivered.");
             }
             catch (Exception e)
             {
             System.out.println(e + "\n");
             e.printStackTrace(System.out);
             }
             }
            
            }
            


            Here is my updated config:

            <?xml version = "1.0" encoding = "UTF-8"?>
            <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
             parameterReloadSecs="5">
            
             <services>
             <service category="TBOT"
             name="AddAgent"
             description="A EJB Frontend speaks natively to the ESB" invmScope="GLOBAL">
             <actions mep="RequestResponse">
             <action name="billingCenterOutputAction"
             class="org.twia.esb.BillingCenterOutputAction"
             process="addProducer">
             <property name="exceptionMethod" value="exceptionHandler"/>
             </action>
             </actions>
             </service>
             </services>
            
            </jbossesb>
            


            Looking back at the programmer's guide I see that JbossESB supports default ReplyTo EPRs for each transport but that some of these require sys admin configuration. There is no mention of default behavior for Local InVM transport in particular. Is this something I need to configure to get this to work?

            I'm trying to validate whether or not I can successfully send a synchronous RequestReply message over the Local InVM transport.

            Thanks for the reply.

            • 3. Re: Unresponsive EPR: InVMEpr

              Anyone?

              Are synchronous calls supported over a Local InVM transport?

              • 4. Re: Unresponsive EPR: InVMEpr
                kconner

                Apologies, we have been away on vacation over the past few weeks.

                InVM does support synchronous invocations provided you are not running within a transaction.

                Your initial problem was because of an active transaction and not, necessarily, the mep of the service. A OneWay service is allowed to route onwards and have a subsequent service handle any responses to the client.

                • 5. Re: Unresponsive EPR: InVMEpr
                  kconner

                  Of course I should add that something has to send a response back to the client :)