Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java-SCA-2.x
-
None
Description
In the TransportServiceInterceptor,invoke method, in the first catch block (corresponding to calling invokeResponse), if there is an error or runtime exception, this should be re-thrown. This allows transacted messages to be rolled back.
Also, in the finally block, a new try/catch block should be added around "((JMSBindingContext)msg.getBindingContext()).closeJmsResponseSession();", so if an error is thrown the resource factory can be used to close the connection:
try
{ ((JMSBindingContext)msg.getBindingContext()).closeJmsResponseSession(); } catch (Throwable t) {
}
// Use the resource factory in the binding context to close the response connection,
// to ensure we use same resource factory used to close response session.
JMSResourceFactory rf = ((JMSBindingContext)msg.getBindingContext()).getJmsResourceFactory();
if (rf.isConnectionClosedAfterUse())
rf.closeResponseConnection();