Skip to content

WebSphereUowTransactionManager doesn't suspend synchronizations correctly [SPR-6167] #10835

@spring-projects-issues

Description

@spring-projects-issues

Mike Youngstrom opened SPR-6167 and commented

We are using WebSphereUowTransactionManager with Hibernate JPA with Transaction scoped EntityManagers. When I have a transaction with REQURIES_NEW. My transaction synchronizations aren't getting suspended for the new nested Transaction. This causes my interactions with JPA while in the new transaction to throw TransactionRequiredExceptions because the EntityManager isn't joined with the new transaction. If I'm using Atomikos as my JTA provider everything seems to work fine.

I can create a test case if needed. But looking at the code the problem appears to be with this line 242:

SuspendedResourcesHolder suspendedResources = (existingTx && !joinTx ? suspend(null) : null);

If I change the code to:

SuspendedResourcesHolder suspendedResources = (newSynch && !joinTx ? suspend(null) : null);

Everything appears to work fine. I'm hoping you can recognize this as a simple coding mistake. Seems weird that "newSynch" wouldn't factor into determining if the synchronizations are suspended or not.

If you need a test case let me know and I'll see what I can come up with.

Mike


Affects: 2.5.6

Referenced from: commits 90f8e5d

1 votes, 1 watchers

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions