-
1. Re: XA Transactions
schrouf Jun 6, 2005 10:57 AM (in response to muthukumaran_m)Do you call <session bean context>.setRollbackOnly() within your sample session bean in case of an Exception ? Make sure you do so, because there is not automatic transaction rollback by the container itself.
Regards
Ulf -
2. Re: XA Transactions
muthukumaran_m Jun 7, 2005 3:11 AM (in response to muthukumaran_m)ThanX a lot man. The thing really is working. Actually I am very much clear regarding XA Transaction, but regarding it's implementation in JBoss i am not that much sure. I got documents and bit of codes from various places and developed the sample that i was talking about. If can help me out in finding a clean document that explains the concept of XA transaction with respect to JBoss.
-
3. Re: XA Transactions
schrouf Jun 7, 2005 4:06 AM (in response to muthukumaran_m)There is no XA transaction concept with respect to JBoss :-) XA in general simply uses a 2-Phase-Commit (2PC) protocol for multi-resource all or nothing transactions.
A central transaction manager (in jboss case a simple in-JVM transaction manager) first issues a prepare call on all affected resources (databases, JMS resource) enlisted in that transaction. Whitin the prepare call all resources try to do most of the internal - possibly failing - work for a transaction e.g. data writing to disk, but simply not 'activating' these changes yet.
If all resources can successfully prepare the transaction, the transaction manager issues the actual commit command to all resources in a second commit call to all resource.
If only one resource cannot prepare the transaction, the transaction manager issuess a rollback command to all already prepared resources.
That's it.
Regards
Ulf -
4. Re: XA Transactions
muthukumaran_m Jun 7, 2005 5:10 AM (in response to muthukumaran_m)ThanX.... that was a neat explanation. But, still as an experienced guy if u can suggest some good docs & samples?. that will be great. Not specifically to XA, but J2EE on Jboss as a whole, with practical approach.