[esb-issues] [JBoss JIRA] Assigned: (JBESB-1835) Exceptionhandling changes with InVM transport
Tom Fennelly (JIRA)
jira-events at lists.jboss.org
Sat Jun 21 10:12:47 EDT 2008
[ http://jira.jboss.com/jira/browse/JBESB-1835?page=all ]
Tom Fennelly reassigned JBESB-1835:
-----------------------------------
Assignee: Tom Fennelly
> Exceptionhandling changes with InVM transport
> ---------------------------------------------
>
> Key: JBESB-1835
> URL: http://jira.jboss.com/jira/browse/JBESB-1835
> Project: JBoss ESB
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transports
> Affects Versions: 4.3
> Environment: the prebuilt jbossesb-server
> Reporter: Haagen Hasle
> Assigned To: Tom Fennelly
> Attachments: native_client_bug_example.zip
>
>
> I've tried to use the new InVM transport instead of JMS. When 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. I see that the exception is not swallowd entirely, I see it in message.getFault(). But a FaultMessageException is never thrown from the ServiceInvoker.
> It's easy to reproduce, just modify the native_client quickstart to use InVM transport, and make sure it throws an exception in MyAction:
> Change MyAction like this:
> 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;
> }
> (And add ActionProcessingException as an import as well.)
> and change the jboss-esb.xml file to look like this:
> <?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 the action throws an ActionProcessingException, ActionProcessingFaultException or RuntimeException.
> If you call the WS from SoapUI and debug the application, you will see that the catch-block in the WS is never entered when you use InVM transport, but it is if you switch back to JMS.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the esb-issues
mailing list