2 Replies Latest reply on Jun 24, 2012 3:33 AM by ftom2

    Jboss AS 7.1.1 queues are throwing error

    ftom2 Newbie

      Hi,

       

      We have migrated our application from Jboss 4.2.3  to Jboss 7.1.1.final and we have an application with heavy use of JMS. After doing some performance tests we see that whenever we reach a certain amount of messages the application starts to fail since there are not enough queue sessions (javax.jms.JMSException: Could not create a session: IJ000453: Unable to get managed connection for java:/JmsXA).

       

      After some research i discovered that this JMS attribute is only exposed in jboss version 7.1.2 (see here) .

       

      Since, for legal reasons, we can't currently use this version (or the specific build where it was fixed) we decided to edit the source code of 7.1.1.

      So after digging in I discovered this interface: org.jboss.as.messaging.CommonAttributes, which has this attribute:

       

       

      SimpleAttributeDefinition CONNECTION_THREAD_POOL_MAX_SIZE = new SimpleAttributeDefinition("thread-pool-max-size",
          new ModelNode().set(HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE), ModelType.INT,  true, MeasurementUnit.NONE);
      
      
      SimpleAttributeDefinition THREAD_POOL_MAX_SIZE = new SimpleAttributeDefinition("thread-pool-max-size",
          new ModelNode().set(HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE), ModelType.INT,  true, MeasurementUnit.NONE);
      

       

      So I've changed it to look like this:

       

       

      SimpleAttributeDefinition CONNECTION_THREAD_POOL_MAX_SIZE = new SimpleAttributeDefinition("thread-pool-max-size",
              new ModelNode().set(System.getProperty("og.max.pool.size")), ModelType.INT,  true, MeasurementUnit.NONE);
      

       

      And i've set the system property to be '2000', but after deploying the new code the application still fails after 5 minutes with the same error.

      Am i doing something wrong? Is this not the propery i need to change?

        • 1. Re: Jboss AS 7.1.1 queues are throwing error
          Justin Bertram Master

          After doing some performance tests we see that whenever we reach a certain amount of messages the application starts to fail since there are not enough queue sessions (javax.jms.JMSException: Could not create a session: IJ000453: Unable to get managed connection for java:/JmsXA).

          This error is specifically related to the JmsXA JCA connection factory and not a statement about a lack of sessions in the server at large.  The solution to this problem is to increase the size of the connection pool via <max-pool-size> and <min-pool-size>.  Unfortunately you have to have a version of AS7 which includes https://issues.jboss.org/browse/AS7-4330 (which 7.1.1 does not).  You'll either have to use a nightly build or pull JBoss AS and build it yourself to get the fix at this point since there is no release which contains it.

           

          Am i doing something wrong? Is this not the propery i need to change?

          You are not changing the proper setting.  See my previous answer for more details.

          • 2. Re: Jboss AS 7.1.1 queues are throwing error
            ftom2 Newbie

            Hi,

             

            Actually i was changing the right values, i was just compiling the wrong code

             

            I got it working so thanks anyway.