users@glassfish.java.net

Re: Connect to two diffrent JMS brokers (not clustered)

From: <forums_at_java.net>
Date: Mon, 18 Jul 2011 09:21:47 -0500 (CDT)

I need to connect to two totally separate JMS brokers - they're not clustered
and don't have any relationship to each other. Both are running OpenMQ
By default, applications running in GlassFish will try to connect to the
JMS broker running embedded in the same JVM as GlassFish (this is defined in
the JMS service configuration in the G;assFish admin console).  You can
change this to point to a remote broker but this will then apply to all
connections.

How does one set this up? How does this relate to the Java Message Service?
The documentation is really vague - is it simply a matter of specifying the
address list on two different connection factories?
Yes. You can override the global JMS service setting on an individual
connection factory by setting a property AddressList to the broker you want
to connect to (this typically is of the form mq://host:port)

Is it possible to have one broker be an embedded or local broker and one be a
remote?
Yes.

Nigel

 

 


--
[Message sent by forum member 'nigeldeakin']
View Post: http://forums.java.net/node/822815