-
1. Re: De associating thread from a transaction
marklittle Jul 2, 2013 4:20 AM (in response to abyv)1 of 1 people found this helpfulNarayana supports multiple threads being active in the same transaction at the same time. If one of them successfully marks the transaction as rollback-only, then the transaction must rollback. There's also the concept of a CheckedAction (see the documentation), which allows you to do some interesting things in a thread(s) once the transaction terminates.
-
2. Re: De associating thread from a transaction
abyv Jul 7, 2013 4:37 PM (in response to marklittle)Thank You once again Mark, I am using the jboss jta 4.17 version as a library for my application( using the maven pom uploaded in the maven repository). When I tested for multiple threads, it was raising an illegalstateException,since a transaction can be associated to only a single thread at a time. Do I need to import the entire maven module of Jboss jts 5.0.0 for the multi threading feature ?
Do I need to use OTS API''s( in place of javax.jta.TransactionManager) to achieve this ?
-
3. Re: De associating thread from a transaction
mmusgrov Jul 8, 2013 4:36 AM (in response to abyv)Are you using the JTS version of the product and did you set the property com.arjuna.ats.jts.checkedTransactions to true (you set it in the properties file or programatically by calling jtsPropertyManager.getJTSEnvironmentBean().setCheckedTransactions(true)).
I think this is a JTS only supported feature.
-
4. Re: De associating thread from a transaction
abyv Jul 8, 2013 4:45 AM (in response to mmusgrov)ThanK You Michael I was expecting this feature to be part of JTA implementation,
I am using the jboss jta library, i doubt this includes the jts feature. Currently I am loading the transaction manager from the JTAPropertyManager. I am excited about the JTS feature, for that I would like to know, how I would switch from jboss jta to jts implementation.?
-
5. Re: De associating thread from a transaction
mmusgrov Jul 8, 2013 5:21 AM (in response to abyv)1 of 1 people found this helpfulThis is covered in http://docs.jboss.org/jbosstm/5.0.0.M3/guides/narayana-jts-administration_guide/index.html#d0e633 but basically you need to set two properties to switch the library into JTS mode. Progamatically you would need to call the following before using the TM:
JTAEnvironmentBean jtaEnvironmentBean = BeanPopulator.getDefaultInstance(JTAEnvironmentBean.class);
jtaEnvironmentBean.setTransactionManagerClassName(com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple.class.getName());
jtaEnvironmentBean.setUserTransactionClassName(com.arjuna.ats.internal.jta.transaction.jts.UserTransactionImple.class.getName());
and similarly if you want to do it via the properites file.