[
https://issues.jboss.org/browse/JBTM-1556?page=com.atlassian.jira.plugin....
]
Tom Jenkinson commented on JBTM-1556:
-------------------------------------
Perhaps we could add an SPI method:
org.jboss.tm.TxUtils::isTimeoutBeingProcessedByTransactionManagerThread()
The implementation for Narayana could then be to just check the thread name as you
currently do, but it would allow us to alter it in the future if necessary without
changing your code. If you both agree, I will ask Mike to add this to the Narayana SPI.
Also, please have a think if you agree with the signature:
public boolean org.jboss.tm.TxUtils::isTimeoutBeingProcessedByTransactionManagerThread ()
returns false if the call is issued when the current transaction is not rolling back due
to timeout or the thread that is performing the rollback was not created by the
transaction manager.
returns true if the current thread was one created by the transaction manager AND it is
processing a timeout scenario
Its quite a niche method but it decouples you from internal Narayana code and moves you to
the SPI
provide way for Synchronization.afterCompletion callee to know if the
Reaper thread is calling
----------------------------------------------------------------------------------------------
Key: JBTM-1556
URL:
https://issues.jboss.org/browse/JBTM-1556
Project: JBoss Transaction Manager
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Transaction Core
Affects Versions: 4.17.3
Reporter: Scott Marlow
Assignee: Tom Jenkinson
Fix For: 4.17.5, 5.0.0.M4
When the Synchronization.afterCompletion is invoked for EE JPA containers, knowledge of
whether the current thread is the Reaper thread (cancelling the transaction from a
background thread).
The fix to this jira will help with handling the [JPA 2.1 container concurrency
requirements|http://java.net/projects/jpa-spec/lists/jsr338-experts/archi...].
Please implement the solution makes the most sense to you, as this will introduce an
additional dependency between other systems and JBossTM/JBossTS that depend on the
solution, that will likely be around for a long time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira