|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
EJBs and transactions |
« View previous topic :: View next topic » |
Author |
Message
|
javierDiaz |
Posted: Mon May 27, 2002 5:49 am Post subject: EJBs and transactions |
|
|
Novice
Joined: 04 Mar 2002 Posts: 13 Location: Ireland
|
Hi there,
I have an EJB that invokes a "send" method from another EJB which acts as a JMS dispatcher of messages: the caller EJB invokes (using a loop) the JMS EJB and this one sends the messages off.
My problem is that all the messages sent within the loop constitute a transaction, which means that if the 10th message cannot been sent (e.g. MQ error) everything should be rolled back and no messages should be sent at all. I know that JMS provides the commit() and rollback() methods to control this, but in this case we need to be able to control this from the caller application, in other words, from another EJB and not from JMS. I have tried using "container-managed transaction" for the 2 EJBs and invoking the setRollbackOnly() method from the caller EJB but the messages are still put into the output queue.
I would really appreciate if anyone could point me in the right direction about how this could be done.
Thanks a lot,
javi |
|
Back to top |
|
 |
araghav |
Posted: Tue May 28, 2002 5:42 am Post subject: Have you tried any sample code with transaction object |
|
|
Novice
Joined: 21 May 2002 Posts: 12
|
I am not expert, but here are my 2 cents -
One of the reason could be that you are making JMS/MQSeries call using client binding mode. If thats not the case, I will say you will be better of by running any sample (non-EJB code) code that uses usertransaction object. If that is working then it is problem with EJB configuration otherwise JMS/MQSeries configuration.
Hope this will help.
-Ashish |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|