Inside my EJB I do the following: Add a row to table A Send a JMS message that table A has been modified Add a row to table B Add a row to table C
The problem is that if when adding data to tables B or C fails I rollback the entire transaction but the JMS message is still sent. Is there a way I can keep the messaging code in the same method that modifies table A and have it rollback too or should I just use flags and test them after all the db access is finished?
In that case my EJB code would look like this:
Add a row to table A
Set flag to send a message that table A has been modified
Add a row to table B
Add a row to table C if the table A flag is true
Send a JMS message that table A has been modifiedThis way the message only get sent if all db access succeeds but my code is a little bit more complicated.
Suggestions? -- Michael Klem <[EMAIL PROTECTED]> 626-296-3027
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
