users@glassfish.java.net

Sending messages between two different Glassfish instances

From: Nils <n.bruenggel_at_gmail.com>
Date: Fri, 30 Oct 2009 16:54:42 +0100

Dear Glassfish Community

I've realized a simple scenario with two EJB projects: The first
project sends a JMS message to the second, containing an object the
second projects receives it (using an MDB and a queue) . It then
investigates the object and then sends an answer, depending on the
object back to the first instance.

This works well if I deploy both projects in the same Glassfish
server, however I didn't get it to work on two different servers. I
used InitialContext with Properties and set the hostname of the other
server to create the ConnectionFactory and the Queue. It seems that it
was able to create the objects using JNDI, but there was no
communication between the two servers (checked using tcpdump).

I'm not quite sure whether my approach was right, therefore I ask here.

Nils