[jbossts-issues] [JBoss JIRA] Commented: (JBTM-329) When BridgeParticipantAT receives prepare, participant should associate current thread with corresponding JTA transaction

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Tue Feb 10 08:25:50 EST 2009


    [ https://jira.jboss.org/jira/browse/JBTM-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12451969#action_12451969 ] 

Jonathan Halliday commented on JBTM-329:
----------------------------------------

This one is actually quite subtle. The prepare itself is not guaranteed to occur in the tx context (and typically doesn't), but the beforeCompletion is. It's just that in subordinate tx they happen to be bundled up together at present. They really need separating out, so that instead of a subordinate tx exposing only the 2PC methods, it exposes the beforeSync, 2PC and afterSync phases such that they can be driven individually by its parent. This also fixes the problem of transaction prepares taking too long and timing out due to the cost of flushing a large amount of data during beforeCompletion.

> When BridgeParticipantAT receives prepare, participant should associate current thread with corresponding JTA transaction
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBTM-329
>                 URL: https://jira.jboss.org/jira/browse/JBTM-329
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: WS-T Implementation
>         Environment: JBoss-4.2.1.GA, JBossTS-4.2.3.SP7
>            Reporter: Pavel Kadlec
>             Fix For: 4.7
>
>
> When participant receives prepare from coordinator, it calls prepare on jta transaction. SubordinateAtomicAction.doPrepare then calls beforeCompletion() method. Hibernate registers Synchronization object which is called in  beforeCompletion() method. In that synchronization object, when hibernate cannot find transaction on current thread, it flushes all entites into database, which is bad.
> When Hibernate cannot find transaction on thread, it logs WARN  [AbstractEntityManagerImpl] Transaction not available on beforeCompletionPhase: assuming valid
> Fix is easy, BridgeParticipantAT should associate current thread with the corresponding JTA transaction. And finally it should suspend that JTA transaction.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossts-issues mailing list