tightly coupled transactions support of sql server

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

tightly coupled transactions support of sql server

quanz123
Hi,

I use Bitronix as transaction manager for my jpa/jdbc mix project via spring, they work as expected in oracle,
but when migrate to MS SQL server, the table being blocked after some insert, update, we found this by google,
http://msdn.microsoft.com/en-us/library/aa342335.aspx,
msdtc default worked in Loosely-Coupled mode,so multiple xa branches is isolated from one another.In order to
use the tightly coupled transactions feature, must set the SSTRANSTIGHTLYCPLD(an int value of 32768) on
the flags parameter of the XAResource.start method. My temporary workaround is patch the
 bitronix.tm.internal.XAResourceManager#enlist, change XAResource.TMNOFLAGS to 32768, then it works!
Is there a more elegant way to do this?

Thanks


Reply | Threaded
Open this post in threaded view
|

Re: tightly coupled transactions support of sql server

Ludovic Orban
Administrator
Unfortunately there is no clean way to do this at the moment. Microsoft decided to implement this feature is a completely non-standard way while they could have introduced a config setting in their XADataSource implementation.

I could add an extra connection pool setting for this purpose but I'm not comfortable in doing this as I don't have a SQL server installation anymore and I don't know the exact impact of that flag on other transaction aspects, like joins for instance.

I'm open to any suggestion to improve the situation tough.
Reply | Threaded
Open this post in threaded view
|

Re: tightly coupled transactions support of sql server

quanz123
Hi,

An option for transaction mode may be appropriate.In contrast to Microsoft, oracle need an extra option to use
loosely-coupled transaction,accroding to Oracle® Database JDBC Developer's Guide and Reference
10g Release 2 (10.2)
, we need call xa.start with flag OracleXAResource.ORATRANSLOOSE.

How about other database like db2 or sybase,i need more googling.
Reply | Threaded
Open this post in threaded view
|

Re: tightly coupled transactions support of sql server

vfonger
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I would like to know if there is a resolution regarding this SQL server issue.  I run into the same problem with SQL server and I would like to know if there is a Bitronix configuration that can set the SSTRANSTIGHTLYCPLD flag for SQL server.  Thank you very much.