5 Replies Latest reply on Jun 19, 2008 11:17 AM by tfennelly

    InVM transport problem

    haagenhasle

      Hi!

      I've just upgraded my server to 4.3.GA, and I'm busy testing it out now. I tried to use the new InVM transport instead of JMS. At first glance it looks awesome, but then an exception occurs in my action something strange happens. When I use JMS, my code cathes a FaultMessageException from the call to the ServiceInvoker. When I use InVM transport, the exception seems to disappear.

      Any comments on this? I would have thought that the exception-handling should be the same regardless of which transport I use, so this looks like a bug to me.

      Regards, Haagen

        • 1. Re: InVM transport problem
          haagenhasle

          Let me add that I see that the exception is not swallowd entirely, I see it in message.getFault(). But a FaultMessageException is never thrown.

          Regards, Haagen

          • 2. Re: InVM transport problem
            tfennelly

            Haagen, would you mind creating a JIRA and attaching a sample example that reproduces this?

            • 3. Re: InVM transport problem
              haagenhasle

              Sure, I'll create the Jira. It's easy enough to reproduce, I can just modify the native_client quickstart to use InVM transport, and make sure it throws an exception in MyAction

              public Message playWithMessage(Message message) throws Exception {
               Body msgBody = message.getBody();
               String contents = (String) msgBody.get();
              
               if( contents.equalsIgnoreCase("throwexception") ) {
               throw new ActionProcessingException(new RuntimeException("Throw exception"));
               }
               // Reset the message body contents with the response...
               msgBody.add(("Hello From ESB MyAction: " + contents));
              
               return message;
               }

              (I had to add ActionProcessingException as an import as well.)
              and
              <?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">
              
               <providers>
              
               </providers>
              
               <services>
              
               <service category="MyServiceCategory"
               name="MyNativeClientService"
               description="A WS Frontend speaks natively to the ESB" invmScope="GLOBAL">
              
               <actions>
               <action name="displayAction"
               class="org.jboss.soa.esb.samples.quickstart.nativeclient.MyAction"
               process="displayMessage">
               <property name="exceptionMethod" value="exceptionHandler"/>
               </action>
               <action name="playAction"
               class="org.jboss.soa.esb.samples.quickstart.nativeclient.MyAction"
               process="playWithMessage">
               <property name="exceptionMethod" value="exceptionHandler"/>
               </action>
               <action name="finalDisplayAction"
               class="org.jboss.soa.esb.samples.quickstart.nativeclient.MyAction"
               process="displayMessage">
               <property name="exceptionMethod" value="exceptionHandler"/>
               </action>
               </actions>
               </service>
               </services>
              
              </jbossesb>


              Note that it makes no difference if I throw an ActionProcessingException, ActionProcessingFaultException or RuntimeException from the action.


              Regards, Haagen


              • 4. Re: InVM transport problem
                haagenhasle

                Here's the Jira: http://jira.jboss.com/jira/browse/JBESB-1835

                Regards, Haagen

                • 5. Re: InVM transport problem
                  tfennelly

                  Thanks Haagen.