ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » EJBs and transactions

Post new topic  Reply to topic
 EJBs and transactions « View previous topic :: View next topic » 
Author Message
javierDiaz
PostPosted: Mon May 27, 2002 5:49 am    Post subject: EJBs and transactions Reply with quote

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
View user's profile Send private message Visit poster's website
araghav
PostPosted: Tue May 28, 2002 5:42 am    Post subject: Have you tried any sample code with transaction object Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » EJBs and transactions
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.