0 Replies Latest reply on Jul 19, 2013 4:10 AM by Anup Parkhi

    Clustered JNDI in JBOSS EAP 6.1

    Anup Parkhi Newbie

      I am using jboss eap 6.1 servers. I want to do JNDI lookup for HornetQ connection factory. My HornetQ producer works as follows:


      1. Lookup connection factory from a JNDI server.

      2. Create QConnection

      3. Create session

      4. Send message

      5. Close session

      6. Close connection


      Above step is repeated for every message. I know this is anti-pattern but i am not allowed to change the code.


      My question is that is it possible to setup JNDI servers in a cluster? The advanatage of this approach is that if one of the JNDI server (entire JBOSS EAP server) is down then my producer can still connect to any of the available JNDI server to get the connect factory. From my producer code, can i connect to a multicast address that belong to JNDI cluster and then i should be forwarded to any of the available JNDI (JBOSS EAP 6.1) servers.


      I could not find any documentation of clustered JNDI in JBOSS EAP 6.1 documentation. The HA-JNDI was available in JBOSS EAP 5.x.


      Also, i have been able to specify the list of JNDI server IP addresses in Context.PROVIDER_URL when i create a InitialContext. If first server in the list is not available then it tries to connect to the second one and so on. What i am looking for is a generic solution and i don't have to specify individual JNDI servers IP addresses.


      Thanks for your help