[jbossts-issues] [JBoss JIRA] Commented: (JBTM-328) Synchronization bug in org.jboss.txbridge.TxBridgeManager

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Fri May 22 12:13:56 EDT 2009


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

Jonathan Halliday commented on JBTM-328:
----------------------------------------

Both threads can get null, but only one will create the mapping. The other will be blocked on the synchronized createMappings method. When it gets the lock and goes into the create method if will first try (and succeed) with another get attempt and create a new entry only if it's still getting null.

> Synchronization bug in org.jboss.txbridge.TxBridgeManager
> ---------------------------------------------------------
>
>                 Key: JBTM-328
>                 URL: https://jira.jboss.org/jira/browse/JBTM-328
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: XTS
>         Environment: JBoss-4.2.1.GA, JBossTS-4.2.3.SP7
>            Reporter: Pavel Kadlec
>            Assignee: Jonathan Halliday
>             Fix For: 4.7.0
>
>
> Method org.jboss.txbridge.TxBridgeManager.getInboundBridge() should be synchronized, 
> there should at least  synchronization of following code is necessary
> Xid xid = txIdMappings.get(externalTxId);
> if(xid == null) {
> 	xid = createMappings(externalTxId);
> }

-- 
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