[jboss-jira] [JBoss JIRA] Updated: (JBAS-4382) EnterpriseContext lock counting is not synchronized

Jeff Zhang (JIRA) jira-events at lists.jboss.org
Sun Aug 10 23:17:00 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBAS-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Zhang updated JBAS-4382:
-----------------------------

    Attachment: 4382_trunk.patch


Also create patch for trunk using java.util.concurent.
need we fix this on the trunk?

> EnterpriseContext lock counting is not synchronized
> ---------------------------------------------------
>
>                 Key: JBAS-4382
>                 URL: https://jira.jboss.org/jira/browse/JBAS-4382
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EJB2
>            Reporter: Adrian Brock
>            Assignee: Jeff Zhang
>             Fix For: JBossAS-4.2.4.GA
>
>         Attachments: 4382_trunk.patch
>
>
> The lock counting in org.jboss.ejb.EnterpriseContext is not synchronized.
> The lock ivar is not even volatile.
> This variable needs replacing with synchronized method blocks or an oswego concurrent SynchronizedInt.
> This bug could either cause passivation to be invoked when it shouldn't or vice versa.
> Additionally, even with this fix, the usage in StatefulSessionInstanceInterceptor needs replacing with something more atomic!
>             if (!ctx.isLocked())
>             {
>                
>                //take it!
>                ctx.lock();
>             }

-- 
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 jboss-jira mailing list