[jboss-jira] [JBoss JIRA] Resolved: (JBAS-3972) incorrect synchronization in JmsServerSessionPool

Weston Price (JIRA) jira-events at lists.jboss.org
Wed Feb 14 16:51:30 EST 2007


     [ http://jira.jboss.com/jira/browse/JBAS-3972?page=all ]

Weston Price resolved JBAS-3972.
--------------------------------

    Fix Version/s: JBossAS-5.0.0.Beta2
                   JBossAS-4.2.0.CR1
       Resolution: Done

Fixed incorrect synchronization handling of server sessions
as well as using the correct cloned session list in startup code.

> incorrect synchronization in JmsServerSessionPool
> -------------------------------------------------
>
>                 Key: JBAS-3972
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3972
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JCA service
>    Affects Versions: JBossAS-4.0.5.GA
>            Reporter: james ahlborn
>         Assigned To: Weston Price
>            Priority: Minor
>             Fix For: JBossAS-5.0.0.Beta2, JBossAS-4.2.0.CR1
>
>
> the code within connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSessionPool.java setupSessions() incorrectly synchronizes on the serverSessions (serverSessions is used on lines 202 and 205 outside the synch block).  the method should look like (starting at line 190):
>       // Create the sessions
>       ArrayList clonedSessions = null;
>       synchronized (serverSessions)
>       {
>          for (int i = 0; i < spec.getMaxSessionInt(); ++i)
>          {
>             JmsServerSession session = new JmsServerSession(this);
>             serverSessions.add(session);
>          }
>          sessionCount = serverSessions.size();
>          clonedSessions = (ArrayList) serverSessions.clone();
>       }
>       // Start the sessions
>       for (int i = 0; i < clonedSessions.size(); ++ i)
>       {
>          JmsServerSession session = (JmsServerSession) clonedSessions.get(i);
>          session.setup();
>       }

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