3 Replies Latest reply: Apr 13, 2012 10:37 AM by Viacheslav Krot RSS

HornetQ pool configuration

Viacheslav Krot Newbie

Hello all,

 

Could anyone help me to configure HornetQ in JBoss7? The problem is as following:

I've configured all queues and topics, it works most of the time, but in some parts of the code I get ResourceException when trying to open new session (Unable to get managed connection for java:/connectionfactory).

It says that timeout occured during waiting for connection, default timeout is 30sec, thread coult - 20. How do I increase max pool size? I increased thread pool size in server config, but it seems to be some other pool:

 

<subsystem xmlns="urn:jboss:domain:messaging:1.1">
            <hornetq-server>
                <clustered>true</clustered>
                <persistence-enabled>true</persistence-enabled>
                <thread-pool-max-size>100</thread-pool-max-size>
  ...

 

And I still see that pool size is equal to 20 during debug. Pool name is HornetQConnectionDefinition.

How can I increase max pool size?

Let me know if any other information could help.

 

And one more question: do I need transaction mode "xa"? If I use some jdbc resource from MDB and have persistance queues, than it should be "xa"?

 

Thank you in advance. 

  • 1. Re: HornetQ pool configuration
    Andy Taylor Master

    thats not really a hornetq question, MDB's are part of the AS.

     

    re your question aboiut using XA that all depends on your app, if you want the mdb consumption or send to be part of the tx then yes. altho i think it is xa by default

  • 2. Re: HornetQ pool configuration
    Jeff Mesnil Master


    Viacheslav Krot wrote:

     

    <subsystem xmlns="urn:jboss:domain:messaging:1.1">             <hornetq-server>                 <clustered>true</clustered>                 <persistence-enabled>true</persistence-enabled>                 <thread-pool-max-size>100</thread-pool-max-size>   ... 

     

    And I still see that pool size is equal to 20 during debug. Pool name is HornetQConnectionDefinition.

    How can I increase max pool size?

     

    This configuration is used to configure the thread pool used by HornetQ server to parallelize its execution. It is unrelated to pooled JMS connection factory.

     

    There was a bug preventing to set the min/max size for JMS pooled connection factory that has been recently fixed in AS7 https://issues.jboss.org/browse/AS7-4330.

     

    If you run the latest code from AS7, you can set the pool sizes correctly:

     

                  <pooled-connection-factory name="my-cf-pool">

                     <min-pool-size>42</min-pool-size>

                     <max-pool-size>242</max-pool-size>

                      ...

                  </pooled-connection-factory>

  • 3. Re: HornetQ pool configuration
    Viacheslav Krot Newbie

    Jeff Mesnil,

    Thank you!