M
Mark
Hi
I am performing the following:
- Call a Session EJB method
- In this method I am placing some messages on a JMS queue
- Invoking rollback on the bean (getSessionContext().setRollbackOnly()
- The messages are removed from the queue as part of the rollback.
My question is:
I have tried creating the JMS session using both true and false as the
transacted attribute. In both cases the messages are removed on rollback.
(conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); &
conn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
I want to call an EJB method and irrespective of the success or not of the
method I want any messages placed on the JMS queue to stay there. ie
I do not want them removed in a rollback of the session bean transaction.
How can i do this?
Using false on the JMS session creation does not seem to disable transactions
and true does not seem to create a new transaction. In both cases the JMS
transaction joins to the session bean global transaction. How do I stop this?
Any ideas? Starting to get very frustrated.
Thanks
I am performing the following:
- Call a Session EJB method
- In this method I am placing some messages on a JMS queue
- Invoking rollback on the bean (getSessionContext().setRollbackOnly()
- The messages are removed from the queue as part of the rollback.
My question is:
I have tried creating the JMS session using both true and false as the
transacted attribute. In both cases the messages are removed on rollback.
(conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); &
conn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
I want to call an EJB method and irrespective of the success or not of the
method I want any messages placed on the JMS queue to stay there. ie
I do not want them removed in a rollback of the session bean transaction.
How can i do this?
Using false on the JMS session creation does not seem to disable transactions
and true does not seem to create a new transaction. In both cases the JMS
transaction joins to the session bean global transaction. How do I stop this?
Any ideas? Starting to get very frustrated.
Thanks