4 Replies Latest reply on Nov 15, 2011 1:43 AM by Patrick Refondini

    Your opinion regarding "obtaining JMS Queue directly from JMS QueueSession using Netty connection only and no JNDI"

    Patrick Refondini Newbie

      In J2EE context (JBOSS AS), while trying to streamline JMS configurations using

      remote Netty connection factory I have successfully replaced JNDI calls to obtain

      JMS Queue by using queueSession.createQueue() as follow:

       

      (...)

      // Obtain the request queue directly from the session

      Queue requestQ = queueSession.createQueue("myQueueName");


      // Create queue sender

      QueueSender myQueueSender = queueSession.createSender(requestQ);

       

      // Send the message

      myQueueSender.send(message);

      (...)

       

      To me the benefit seems twofold:

      1. Remote HornetQ connections can be achieve using Netty with no remote JNDI calls. For instance a HornetQ JMS client within a JBOSS AS 5.1.0 patched with HornetQ 2.2.5.Final can dialog with HornetQ JMS server withing JBOSS AS 6.1.0.Final or JBOSS AS 7.0.2.Final JMS servers (all of them using HornetQ 2.2.5.Final)
      2. Queue will benefit of any Netty defined connection behaviour such as client reconnection, automatic discovery,...

       

      I'd be interested in your opinion regarding the above.

       

      Patrick