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

james ahlborn (JIRA) jira-events at jboss.com
Tue Jan 9 15:33:34 EST 2007


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: JMS service
    Affects Versions: JBossAS-4.0.5.GA
            Reporter: james ahlborn
         Assigned To: Adrian Brock
            Priority: Minor


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