users@glassfish.java.net

Remote JMS Broker Problem.

From: <glassfish_at_javadesktop.org>
Date: Thu, 09 Aug 2007 12:35:05 PDT

Hi All,

I have a need to send JMS message from a stateless session ejb running in one Glassfish instance (say A) to a JMS queue hosted on another instance of Glassfish server (say B). There are queues hosted on both instance A & B and the message can be routed to local or remote queue based on business logic.

The only way I could find to accomplish this in Glassfish was to:
In Glassfish instance A, create a QueueConnectionFactory with AddressList set to host/jms port of the Glassfish instance B. We use default username/password i.e. admin/admin.

However this does not write message to Glassfish instance B. The message shows up in the same named Q hosted on instance A. I had to create the same named queue on instance A because jndi lookup on Glassfish instance B from inside an EJB does not work in Glassfish (I have debugged the problem, Glassfish always uses local JNDI provider inside EJB even when setting ORBInitialHost/ORBInitialPort, PROVIDER_URL, there is no way to perform a remote JNDI lookup from inside an EJB in Glassfish!). The message is never delivered to the queue hosted remotely on instance B. Any reason why this would not work? Are there additional settings that I am missing?

Any help is highly appreciated.
--
Sanjay
[Message sent by forum member 'sanjaydwivedi' (sanjaydwivedi)]
http://forums.java.net/jive/thread.jspa?messageID=230312