mq
  1. mq
  2. MQ-215

Number of allocated threads does not decrease even if connections are released

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: broker-core
    • Labels:
      None

      Description

      Follow the steps below to reproduce the issue.

      1.Create a connection factory with minimum pool 1 and idle time out 10.

      asadmin create-jms-resource --restype javax.jms.ConnectionFactory jms/CF
      asadmin set resources.connector-connection-pool.jms/CF.steady-pool-size=1
      asadmin set resources.connector-connection-pool.jms/CF.idle-timeout-in-seconds=10
      

      2.Execute ConnectionFactory.createConnection() 10 times using the Connection Factory created in step 1.

      Connection connection[] = new Connection[10];
      InitialContext initialContext = new InitialContext() ;
      ConnectionFactory cf = ( ConnectionFactory ) initialContext.lookup("jms/CF") ;
      for(int i=0;i<10; i++) {
           connection[i] = cf.createConnection();
      }
      

      3.Execute "imqcmd query svc -n jms" and confirm the "Current Number of Allocated Threads" is larger than "Min Number of Threads".

      • Current Number of Allocated Thread: 22
      • Current Number of Connections: 10
      • Min Number of Threads: 10 (default)

      4.In the JMS application used in step. 2, execute Connection.close() 5 times. This closes 5 connections.

      for(int i=0;i<5; i++) {
          connection[i].close();
      }
      

      5.After 10 minutes, execute "imqcmd query svc -n jms" to check the following values.

      • Current Number of Allocated Thread: 20
      • Current Number of Connections: 5
      • Min Number of Threads: 10 (default)

      Problem:
      The Current Number of Allocated Thread does not decrease as expected.

      Expected:
      Current Number of Allocated Thread decreases and becomes one of the followings:

      • The Current Number of Allocated Thread is the same number as the Min Number of Threads.
      • The Current Number of Allocated Thread is the same as twice the value of Current Number of Allocated Thread.

      6.Terminate the JMS application mentioned in step 2.

        Activity

        Hide
        tak09 added a comment -

        Environment: Glassfish v4.0 b45 Windows

        Show
        tak09 added a comment - Environment: Glassfish v4.0 b45 Windows

          People

          • Assignee:
            amyk
            Reporter:
            tak09
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: