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

Move synchronization point creation just before transaction begins to enable routing datasources to act on transaction definition [SPR-16876] #21415

Open
spring-projects-issues opened this issue May 27, 2018 · 1 comment
Labels
in: data status: waiting-for-triage

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented May 27, 2018

Kaan Ozdokmeci opened SPR-16876 and commented

In org.springframework.transaction.support.AbstractPlatformTransactionManager#getTransactionmethod,

the synchronization point is created after the transaction is created and a connection is attached to it via the doBegin method.

Having the synchronization point created afterwards prevents the ability to utilize an AbstractRoutingDatasource that is able to pick between read-only and read-write datasources for the transaction by inspecting 

org.springframework.transaction.support.TransactionSynchronizationManager#isCurrentTransactionReadOnly

when determining the appropriate datasource.

 

Is there any reason not to move synchronization point creation before the doBegin method so that routing datasources can act on the transaction definition?

If not happy to send a PR.


No further details from SPR-16876

@spring-projects-issues spring-projects-issues added status: waiting-for-triage in: data type: enhancement and removed type: enhancement labels Jan 11, 2019
@OrangeDog
Copy link

@OrangeDog OrangeDog commented Feb 22, 2021

@jhoeller as the old assignee, can this be triaged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data status: waiting-for-triage
Projects
None yet
Development

No branches or pull requests

2 participants