Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3972

incorrect synchronization in JmsServerSessionPool

    XMLWordPrintable

Details

    Description

      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(); }

      Attachments

        Activity

          People

            weston.price Weston M. Price (Inactive)
            jahlborn james ahlborn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: