9 Replies Latest reply on Jun 23, 2010 7:39 AM by atijms

    Connection pool for ClusteredConnectionFactory, how to ?

    roman.mandeleil1

      Hi Fellows,

      I am trying to gather some information of connection pooling for JMS.

      Let's say I have the following architecture:


      FrontNode ---> Node1 <---> Node2


      FrontNode gets HTTP trafic and forwards it to Node1, Node2 - cluster over JMS protocol.
      The system works great but the question is regarding pooling connectionFactory.createConnection():

      Basicaly that code runs on FrontNode:

      Queue queue = (Queue) initialContext.lookup("/queue/MyQueue");
      ConnectionFactory cf = (ConnectionFactory) initialContext
      .lookup("/MyClusteredConnectionFactory");

      connection = cf.createConnection();

      Obviously, the create connection is very heavy opperation because it creates the actual socket for the
      message. Two questions:

      1) How to configure the pool for the create connection operation ?
      2) The connection factory is been accessed as a stub because it been
      recieved over JNDI so where the configuration for the pool should be applied on the Node1 or on FronNode ?

      *) I am using JBoss 5.1 GA