-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: feedback-providedFeedback has been providedFeedback has been providedtype: enhancementA general enhancementA general enhancement
Milestone
Description
I am working currently on implementing reactive Transactions with our new Neo4j reactive driver and need to access the reactive transaction synchronisation manager through
...reactive.TransactionSynchronizationManager#currentTransaction
The JavaDoc says "…Return the TransactionSynchronizationManager of the current transaction…"
I understand that TransactionSynchronizationManager
is merely a wrapper around the TransactionContext
.
Neither the manager nor the context are the transaction itself and therefor I think that the currentTransaction()
would benefit from another name, like current TransactionSynchronizationManager()
or currentTransactionContext()
; it's intentions would be clearer.
cc @mp911de
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: feedback-providedFeedback has been providedFeedback has been providedtype: enhancementA general enhancementA general enhancement
Type
Projects
Relationships
Development
Select code repository
Activity
sbrannen commentedon Jun 5, 2019
Tentatively slated for 5.2 M3
[-]Method naming: TransactionSynchronizationManager#currentTransaction is irritating[/-][+]Rename TransactionSynchronizationManager#currentTransaction to something more meaningful[/+]mp911de commentedon Jun 5, 2019
To add a bit of background: The reactive
TransactionSynchronizationManager
isn't associated with a transaction/TransactionContext
, it is a wrapper to interact with resources and synchronizations stored inTransactionContext
.Renaming that method to
forCurrentTransaction()
could be more expressive.current TransactionSynchronizationManager
is rather bulky. As Javadoc could be always improved, we could refine it along the lines ofReturn the TransactionSynchronizationManager that is associated with the current transaction context
.michael-simons commentedon Jun 5, 2019
A big +1 for
forCurrentTransaction()
. That reads nice and shows the purpose.sbrannen commentedon Jun 5, 2019
That sounds better to me as well.
So, unless someone objects, I'll go ahead and make the proposed name change and Javadoc improvement.
Rename TransactionSynchronizationManager#currentTransaction()
7 remaining items