users@glassfish.java.net

Using JMS for duplex communication

From: Major Péter <majorpetya_at_sch.bme.hu>
Date: Tue, 18 Jan 2011 16:22:11 +0100

Hi,

I'm trying to set up a JMS proof-of-concept, but I'm lost now. The goal
is, that an enterprise project will produce messages in a topic, and
other enterprise projects will consume from that topic. But, it is also
required, that these small client applications has their own Queues, and
the 'master' application will consume from those queues too. The
'master' app and the client apps they're all on different machines.

So what I did for now, is I wrote an application, which creates a Topic
and produces new messages, this is inside a session bean, and opening a
servlet triggers this producing. On the other side there is a
messagedriven bean, which is only configured by annotations. In the
client apps container the topicconnectionfactory has the following
property for now: "AddressList=mq://localhost:7676/jms"

Now if I start up these two projects messages are not received at the
client apps, BUT if I change the client apps server from EMBEDDED mode
to REMOTE mode, and set the JMS service to use the 'master's JMS
service, then after a restart messages are received, and it looks like
everything works.

But if the client apps JMS service is on the remote host, how could I
create my queue on the client machine?? Is it possible to access with
EMBEDDED JMS service a remote Topic? If yes, how?
What did I do wrong?

//I'm using GlassFish v2.1.1

Thanks,
Peter