dcsimg
Nested Transaction requirement- workaround???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Sunday, October 20, 2002 05:18 PM

We have a situation that would best be coded with a nested transaction. As J2EE does not support these, are there standard ways to work around this sort of problem? Our situation is: 1. Get a msg from JMS 2. Process the message- involves inserting data into multiple tables... - If successful- commit msg from queue; commit data. - If unsuccessful- move msg to error queue; rollback ALL table inserts. Our current proposed workaround involves around 4 sequential transactions, use of staging tables, etc. etc. I feel there ought to be a cleaner solution. Ideas most welcome... Gavin Griffith-Jones    More>>

We have a situation that would best be coded with a nested transaction. As J2EE does not support these, are there standard ways to work around this sort of problem? Our situation is:


1. Get a msg from JMS
2. Process the message- involves inserting data into multiple tables...
- If successful- commit msg from queue; commit data.
- If unsuccessful- move msg to error queue; rollback ALL table inserts.


Our current proposed workaround involves around 4 sequential transactions, use of staging tables, etc. etc. I feel there ought to be a cleaner solution.


Ideas most welcome...


Gavin Griffith-Jones

   <<Less

Re: Nested Transaction requirement- workaround???

Posted By:   Gautam_Marwaha  
Posted On:   Monday, October 21, 2002 03:23 AM

Why would you need 4 txns or nested txns for your requirement?

Are you updating one database or multiple databases?

Are you using MDBs? If you are, won't the combination of required txn, AUTO_ACKNOWLEDGE and throwing JMSException (if update SQL fails) work for you?
About | Sitemap | Contact