2 Replies Latest reply on Jul 14, 2003 2:09 AM by r_kumar

    regarding JMS Connection Factories

    r_kumar Newbie

      Dear Jboss Team ,

      I have a client application that atleast creates either 10 to 15 TopicConnection or QueueConnections. In the client, i look-up the UILConnectionFactory for creating the connections. Every thing is working fine but , i think a call to the "createTopicConnection" or "createQueueConnection" will basically create a separate socket connection. Is there a way to reduce the number of sockets been created ?

      Is the usage of the java:/JmsXA been limited to the jvm within which the Jms Server is running ? In such a case how would a remote publisher use the java:/JmsXA ?

      Expecting your assitance ......


        • 1. Re: regarding JMS Connection Factories
          Nathan W. Phelps Novice

          You really should partition your work using Sessions, not connections. That is the design pattern the spec suggests. 10-15 connections is really quite excessive for a single client application. Using this design pattern will certainly help you create fewer sockets.

          java:/JmsXA is for the server-side yes. If you need to use XA remotly use the UILXAConnectionFactory.

          • 2. Re: regarding JMS Connection Factories
            r_kumar Newbie

            Hi nphelps,

            The Client application that i meant is the integration of several independent standalone applications. Each application will create its required Connection/Session/ MessageProducer/ MessageConsumer and cleanup the same when they are stopped. The way you have suggested has been already implemented (caching a single Connection for the applications), but it seems to violate the JMS Specification (a client application should close the Connection/Session ) .

            Does JBoss doesn't provide a IL that supports the feature where the creation of Sockets depends on a Configuration parameter that decides,

            * a new Socket for every call creatTopic/QueueConnection().
            * a single Socket (per JVM) is created and the same is
            used/shared internally by every Connection object, so that
            it is transparent to the JMS application.

            Please let me know your comments on this ...