What I meant is, you said that you enlist the transaction *before* onMessage is called.
Here is the code in JBM that calls onMessage in JMSMessageListenerWrapper:
| try
| {
| listener.onMessage(jbm);
| }
| catch (RuntimeException e)
| {
| //See JMS 1.1 spec, section 4.5.2
|
| log.warn("Unhandled exception thrown from onMessage", e);
|
| if (!transactedOrClientAck)
| {
| try
| {
| session.getCoreSession().rollback(true);
|
| session.setRecoverCalled(true);
| }
| catch (Exception e2)
| {
| log.error("Failed to recover session", e2);
| }
| }
| }
|
So in order to do enlistment before and after onMessage is called, you'd have to change that code, which you don't have access to in JCA.
So I don't understand how you can do the order that you specified.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213658#4213658
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213658