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

Adrian Brock (JIRA) jira-events at lists.jboss.org
Mon Apr 30 13:09:30 EDT 2007


EnterpriseContext lock counting is not synchronized
---------------------------------------------------

                 Key: JBAS-4382
                 URL: http://jira.jboss.com/jira/browse/JBAS-4382
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: EJB2
            Reporter: Adrian Brock
         Assigned To: Scott M Stark
             Fix For: JBossAS-4.2.0.GA


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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list