1 Reply Latest reply on Nov 30, 2011 10:05 PM by Yong Hao Gao

    Caching JMS Connection/Session

    Abbas Raza Newbie

      From this thread in JBoss community http://community.jboss.org/wiki/ShouldICacheJMSConnectionsAndJMSSessions, it makes sense to not cache JMS connection/session if the client resides in a container. In HornetQ manual, it is stated that "Please note that JMS connections, sessions, producers and consumers are designed to be re-used. It's an anti-pattern to create new connections, sessions, producers and consumers for each message you produce or consume.". I am assuming this statement applies when the client is a standalone class or if it is using Hornet's client APIs. Is that a fair assumption?

       

      thanks!