-
1. Re: Will it involve in XA transaction if MysqlXADatasource i
kconner Sep 18, 2006 4:48 AM (in response to vakuthota)Hiya Venu.
It should take part in the XA transaction provided you enlist the XAResource.
Is there any reason you are not obtaining this via JNDI? If it is setup that way then the app server will handle the enlist.
Kev -
2. Re: Will it involve in XA transaction if MysqlXADatasource i
vakuthota Sep 18, 2006 6:05 PM (in response to vakuthota)I cannot obtain via JNDI because MySql db server host is not static i.e., Host address can be anything which i have to read from other application and it is configurable over there.
I think to enlist resources i have to use
javax.transaction.TransactionManager
instead of
javax.transaction.UserTransaction.
In this case can you please help me how to get the JBoss Transaction manager and enlist it ? Do i need to take care of delisting ?
It will be more helpful if you can provide the sample code -
3. Re: Will it involve in XA transaction if MysqlXADatasource i
kconner Sep 19, 2006 10:27 AM (in response to vakuthota)You can obtain the TransactionManager instance from JNDI and use that to obtain the current Transaction instance. You can then enlist the resource obtained from the XAConnection.
You do not need to delist the resource.
Kev -
4. Re: Will it involve in XA transaction if MysqlXADatasource i
marklittle Sep 19, 2006 10:39 AM (in response to vakuthota)You only need to delist the resource if you are finished with the work on that resource with that specific transaction, or you want to suspend the work and come back later (enlist again).