3 Replies Latest reply on Jan 26, 2006 3:29 AM by jaikiran

    Pool size of ManagedConnections in JMS

    jaikiran

      Hi,
      We are using JBoss-3.2.3. We have an application deployed, in which we make use of JMS. Our application relies heavily on sending/receiving messages. We use the receive() API of the QueueReceiver which will wait till a message is received. This effectively, means that the Connection in which this receiver is created is not closed till the receive operation is complete. Naturally, we have started seeing the following exceptions:

       javax.jms.JMSException: Could not create a session: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] )


      After having a look at some topics on this forum, we found that we will have to configure the max-pool-size and the blocking timeout in the jms-ds.xml file. I had a few questions regarding this:

      1) How expensive is a JMS connection? Can i configure a very high value in the max-pool-size without running into any problems, say for example 200? And if yes, will the server be capable enough to make available these many JMS connections when the server is up?

      2) Since jms-ds.xml is a file that will be used by ALL applications on the server, is there any other place, where the same setting can be done for our specific application, without affecting other applications?


      Thank you.


        • 1. Re: Pool size of ManagedConnections in JMS
          genman


          1. 200 is not too many, especially if they are in-JVM.
          2. You can create separate pools for the same resources.

          • 2. Re: Pool size of ManagedConnections in JMS
            jaikiran

            Hi genman,
            Thanks for the quick answers. Your answer to question 1, solves my issue regarding the pool size. Regarding, the answer to question 2, when you mention :

            You can create separate pools for the same resources.


            does this mean, i create a separate myJms-ds.xml file containing the pool size specific to my application and place this file under my application package? If yes, will JBoss pick up this file automatically whenever JMS related activities are happening in my application, or is there some place where i have to mention the name of this file?

            Thank you.




            • 3. Re: Pool size of ManagedConnections in JMS
              jaikiran

               

              does this mean, i create a separate myJms-ds.xml file containing the pool size specific to my application and place this file under my application package? If yes, will JBoss pick up this file automatically whenever JMS related activities are happening in my application, or is there some place where i have to mention the name of this file?


              Sorry genman, that was a silly question from my side. Thought about it a bit and now i get your point:

              - Create a connection factory through myAppJms-ds.xml
              - Give it a jndi-name. Specify application specific pool size
              - While doing JMS operations in the application, lookup this specific ConnectionFactory by its JNDI name and continue with the operations.

              This looks fine. Thanks for your answers.