[JBoss JIRA] Created: (JBESB-1835) Exceptionhandling changes with InVM transport
by Haagen Hasle (JIRA)
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
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..." 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
15 years, 12 months
[JBoss JIRA] Created: (JBESB-1789) Disable smooks shutdown hook in esb environment
by Kevin Conner (JIRA)
Disable smooks shutdown hook in esb environment
-----------------------------------------------
Key: JBESB-1789
URL: http://jira.jboss.com/jira/browse/JBESB-1789
Project: JBoss ESB
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Transformation Service
Affects Versions: 4.3
Reporter: Kevin Conner
Assigned To: Tom Fennelly
Fix For: 4.4
Seen on shutdown when using an esb with SmooksAction
java.lang.IllegalStateException: Shutdown in progress
at java.lang.Shutdown.remove(Shutdown.java:104)
at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
at org.milyn.cdr.SmooksResourceConfigurationStore.close(SmooksResourceConfigurationStore.java:374)
at org.milyn.Smooks.close(Smooks.java:326)
at org.jboss.soa.esb.actions.smooks.SmooksAction.destroy(SmooksAction.java:177)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.handleDestroy(ActionProcessingPipeline.java:552)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.destroy(ActionProcessingPipeline.java:278)
--
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
15 years, 12 months