-
Oct 8th, 2009, 09:08 AM
#1
TopLinkTransactionManager doesn't suspend ConnectionHolder synchronization
Hi,
I'm using TopLinkTransactionManager (from spring-orm-2.5.6.jar) in a configuration scenario which lets me share transactions between TopLink Session and plain JDBC code (the same DataSource). Everything works perfectly fine until i need to open a completely new transaction within a running one (by setting transaction propagation property to REQUIRES_NEW value). In doBegin method TopLinkTransactionManager tries to bind new ConnectionHolder to DataSource but it fails. The reason is that in doSuspend method (which suspends resources of current transction) only SessionHolder is unbound from thread. ConnectionHolder is still bound to DataSource so we get an error trying to open new transaction in doBegin method.
I implemented a workaround which suspends both ConnectionHolder (if present) and SessionHolder in doSuspend method and later resumes these resources in doResume method.
I wonder if this is a bug in TopLinkTransactionManager or an intended behaviour (maybe i miss some details of transaction synhronization for TopLink)?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules