You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by skarthik <ka...@necam.com> on 2006/05/16 23:29:48 UTC

Connecting to 2 JMS servers

Hi,

Is there a way to configure our JMS client application  (stanalone process)
to connect to 2 activeMQ JMS servers simultaneously, using
ActiveMQInitialContextFactory.

The application uses JNDI properties file to lookup the connectionFactory
and topics. We don't use a separate JNDI server.

thanks,
karthik
--
View this message in context: http://www.nabble.com/Connecting-to-2-JMS-servers-t1631467.html#a4419421
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Connecting to 2 JMS servers

Posted by skarthik <ka...@necam.com>.
Thanks for the reply James,

To answer your question, I would have describe our application in brief.

Our application consists of a pair of geographically redundant servers both
of which are active all the time, and each with with identical set of
processes communicating over JMS. The fault-tolerance is not just at JMS
level, but at application and database levels as well (complete site
failure). It is not feasible to forward messages across sites (store
forward/network between brokers) due to the volume and duplication (nature
of the application- both servers would generate same information) of
mesages. Also a message flow from a client to Site A via Site B should be
preferrably avoided. 

The client(s)/GUI user(s) would choose one or the other server to work with,
but would be aware of the complete application level availabilty of each
which is why we need simultaneous connection to both.

 Using a full-fledged JNDI server and registering ConnectionFactory with it
would solve the problem, but was wondering if we could achive the same with
ActiveMQInitialContextFactory wherein, we could associate connectionFactorty
with a particular JMS server (transport connector)

I hope this gives you an idea of the problem.

karthik
--
View this message in context: http://www.nabble.com/Connecting-to-2-JMS-servers-t1631467.html#a4420398
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Connecting to 2 JMS servers

Posted by James Strachan <ja...@gmail.com>.
On 5/16/06, skarthik <ka...@necam.com> wrote:
>
> Hi,
>
> Is there a way to configure our JMS client application  (stanalone process)
> to connect to 2 activeMQ JMS servers simultaneously, using
> ActiveMQInitialContextFactory.
>
> The application uses JNDI properties file to lookup the connectionFactory
> and topics. We don't use a separate JNDI server.

Just out of interest, why do you need to talk to 2 servers? Why not
connect to one of them and failover to the other one - then create a
store/forward network between the brokers?

http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
-- 

James
-------
http://radio.weblogs.com/0112098/