}
// 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();
} catch (JMSException e) {
}
}
}