-
1. Re: How to manage a distribute transaction between 2 Session Beans
wdfink Mar 27, 2012 4:39 AM (in response to warxsg)What version of JBoss do you use for both?
-
2. Re: How to manage a distribute transaction between 2 Session Beans
warxsg Mar 27, 2012 4:46 AM (in response to wdfink)Hi Wolf-Dieter Fink,
Thank you very much for being interested in my issue.
The JBoss1 is a JBoss 5.1
The JBoss2 is a JBoss 4.2
Thanks in advance.
Cheers.
zoster
-
3. Re: How to manage a distribute transaction between 2 Session Beans
wdfink Mar 27, 2012 4:51 AM (in response to warxsg)1 of 1 people found this helpfulI suppose impossible (from my experience)
First is you have to change from JTA => JTS you should read and follow JBOSS_HOME (5.1)/docs/examples/transactions/README.txt.
This will convert the configuration from JTA to JTS for you.
If I remember correct this will not work with 4.x Tx-manager.
-
4. Re: How to manage a distribute transaction between 2 Session Beans
warxsg Mar 27, 2012 5:01 AM (in response to wdfink)Hi Wolf-Dieter Fink,
Thanks for the reply.
I found an article about JTS.
So, If I wanted to manage Distribute Transactions between 2 JBoss, the 2 JBoss must have the same version..or at least being JBoss 5.x
Suppose that after configuring JTS in my JBoss 5.1 what's type of SessionBean should I use ?
I mean, I should use SessionBean with TransactionManagementType=BEAN or TransactionManagementType=CONTAINER ?
Moreover, in case I should use SessionBean with TransactionManagementType=BEAN what's the TransactionAttributeType do I have to use for the methods of the Bean ?
Thank you very much.
Cheers.
zoster
-
5. Re: How to manage a distribute transaction between 2 Session Beans
wdfink Mar 27, 2012 5:11 AM (in response to warxsg)1 of 1 people found this helpfulIn case of using Type=BEAN you have to explicit programming by your own (lookup UserTransaction, begin, commit/rollback), the annotations like Tx=REQUIRED/SUPPORTED are ignored!
Also in case of Bean managed Tx the EJB spec define to suspend a running transaction if the bean is called remote.
For that use Type=CONTAINER and set the Tx annotation that you need to the method.
Also I would recommend to use the latest 5.1 (because of bugfixes since 5.0)
-
6. Re: How to manage a distribute transaction between 2 Session Beans
warxsg Mar 27, 2012 8:21 AM (in response to wdfink)Hi Wolf-Dieter Fink,
just another info; if I used 2 JBoss 4.2.2 would the distribute transaction mechanism work ?
Thank very much for your posts.
Cheers.
zoster
-
7. Re: How to manage a distribute transaction between 2 Session Beans
wdfink Mar 27, 2012 2:26 PM (in response to warxsg)No, only if you use two JBoss 5.1