Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractPlatformTransactionManager breaks in 3.0.0.RC3 [SPR-6521] #11187

Closed
spring-projects-issues opened this issue Dec 4, 2009 · 1 comment
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Abhishek Gupta opened SPR-6521 and commented

Problem:
We have implemented a TransactionManager that extends the AbstractPlatformTransactionManager. We noticed that there's a break when we moved to 3.0.0.RC3.

Details:
In the getTransaction(...) method, when doBegin(...) is called, the TransactionStatus is now instantiated using a private method instantiateTransactionStatus(). This breaks our transactionManager that extends newTransactionStatus(). This is infact the case for all the instances where doBegin() is called throughout the code.
Note: The split between creation of the TransactionStatus and preparingSynchronization whereever doBegin() is being called is correct in that the TransactionStatus needs to be created before a call to doBegin() - this was an OOM issue that Juergen had fixed in 3.0.rc1

Proposed Solution:
newTransactionStatus(...) should keep doing what it did earlier i.e. simply be responsible for creating the new TransactionStatus. The prepareSynchronization(...) method should be called outside of it.


Affects: 3.0 RC3

Referenced from: commits 93abbd0

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

OK, I've reverted newTransactionStatus to its original role, just without preparing synchronization. So overriding newTransactionStatus will affect all TransactionStatus objects being created now, with prepareSynchronization being called afterwards (rather than within newTransactionStatus as before).

I hope that works for you. Would be great if you could give a snapshot a try within the next couple of days...

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: data Issues in data modules (jdbc, orm, oxm, tx) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 GA milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants