-
1. Re: Question regarding transactional behavior while writing to VDB
shawkins Aug 24, 2015 2:06 PM (in response to pranavk)Beyond hooking in the transactionmanger, you need to make sure that the datasources get enlisted. Normally this is handled in the container by having the transactionmanager and the datasource pools integrated so that the enlistment happens automatically when there is a thread bound transaction when a connection is obtained. What are you using for connection pooling and do you have that integrated with atomikos as well?
-
2. Re: Question regarding transactional behavior while writing to VDB
pranavk Aug 25, 2015 5:38 AM (in response to shawkins)Thanks Steven,
I am not using any connection pool as of now. The basic scenario that I’m attempting is writing to a single source (to a VDB atop a single source model), and not a distributed write.
So in this scenario, does the transaction manager have any effect on when that individual connector would commit/rollback? Would these commit/rollback calls by the calling program in this scenario trickle down to the individual connector code in any way?
-
3. Re: Question regarding transactional behavior while writing to VDB
rareddy Aug 25, 2015 8:32 AM (in response to pranavk)See first paragraph for sample code to enlist a XAResource Red Hat JBoss Fuse - EIP Transaction Guide - The XA Enlistment Problem
The TransactionManager would the instance you created with Atamikos.
-
4. Re: Question regarding transactional behavior while writing to VDB
rareddy Aug 25, 2015 8:43 AM (in response to rareddy)BTW, if you are working with single source, you do not need to enlist, and do not have to have XAResource, you can work with JDBC Drivers, in that case translator will either use the autocommit feature or toggle the autocommit accordingly
-
5. Re: Question regarding transactional behavior while writing to VDB
shawkins Aug 25, 2015 9:13 AM (in response to rareddy)> BTW, if you are working with single source, you do not need to enlist, and do not have to have XAResource, you can work with JDBC Drivers, in that case translator will either use the autocommit feature or toggle the autocommit accordingly
That will depend on the operation and the scope of the transaction. Only if we get a batched or other logically atomic set of commands at the translator level and no transaction has been started, will we toggle the autocommit. Any higher level transaction (a client local/global) and we'll assume that the translatormanager is coordinating.