Skip to content

ChainedTransactionManager integration tests #148

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

Closed
wants to merge 3 commits into from

Conversation

mit-jones
Copy link

There looks to be an issue with the ChainedTransactionManager.

Two integration tests (ChainedTransactionManagerIntegrationTests) have been added both functionally the same, both should pass. However one fails (with a CannotCreateTransactionException) where it calls a method that has been advised with transaction propagation NOT_SUPPORTED.

I think there is an issue with the ChainedTransactionManager possibly in the getTransaction() method where the synchronizationManager is initialised regardless of the transaction propagation. Compare this with AbstractPlatformTransactionManager.getTransaction() where initSynchronization() would only be called for transaction propagation of REQUIRED, REQUIRES_NEW and NESTED.

This issue is probably related to https://jira.spring.io/browse/DATACMNS-370 so will be added to this existing JIRA

the second test
testCountFoosWithNotSupportedTransactionPropagationFollowedByCreateAFoo()
fails with an exception 
  
 CannotCreateTransactionException - Could not open JDBC Connection for
transaction; nested exception is java.lang.IllegalStateException:
Already value
[org.springframework.jdbc.datasource.ConnectionHolder@d2de489] 
 for key [org.apache.commons.dbcp.BasicDataSource@3f4faf53] bound to
thread [main]
 
Probably related to https://jira.spring.io/browse/DATACMNS-370
the second test
testCountFoosWithNotSupportedTransactionPropagationFollowedByCreateAFoo()
fails with an exception 
  
 CannotCreateTransactionException - Could not open JDBC Connection for
transaction; nested exception is java.lang.IllegalStateException:
Already value
[org.springframework.jdbc.datasource.ConnectionHolder@d2de489] 
 for key [org.apache.commons.dbcp.BasicDataSource@3f4faf53] bound to
thread [main]
 
Probably related to https://jira.spring.io/browse/DATACMNS-370
@odrotbohm
Copy link
Member

I don't think we can merge this as we're not gonna introduce dependencies to JDBC related artifacts in Spring Data Commons. Still would like to get @jexp's opinion on that one.

@mit-jones
Copy link
Author

Okay understood but how do we proceed from here, I believe the issue still remains. I do not know another way of providing a reproducible test case that can highlight this issue. If you can give me some guidance I am okay with trying another approach but I think it will be difficult to prove without an integration test.

@pivotal-issuemaster
Copy link

@mit-jones Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@schauder
Copy link
Contributor

As @olivergierke explained above we won't merge this one. This does not affect the underlying issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants