ha failover setup with JNDI
bjchip Mar 11, 2010 5:46 PMThere is a reference to using jms to instruct JNDI of the connection factories but I am missing some details. In 38.2.4.1 it describes "using the JMS service on the server to load your JMS connection factory into JNDI" ... on the server.
I've successfully done this with the cluster.. but it is not clear how I should do HA. There seems to be some basic information about the JNDI implementation I need.
I am currently integrating this with JBoss Servers. They have HAJNDI. Do I actually need to point my JBoss Server at the standalone hornetq JNDI instance? I have made several examples work and have connected to a clustered hornetq standalone this way. What I don't know about JNDI is what is giving me fits, and looking it up on the web simply floods me with app specific information, though this appears to answer me a bit...
http://www.theserverside.com/tt/articles/article.tss?l=J2EEClustering
...but is the JNDI we have in hornetq the same shared global clustering as in JBoss?
The JNDI remains a singleton connection, I can connect JNDI to one IP or the other. If the JNDI server disappears (as is likely if the hornetq JMS node it is on disappears) , then how does the JBOSS client work out where things are now? I don't want my apps to have to re-code the java, just to look up the connection factory. The examples all show localhost but I THINK that is so that the examples stay simple.
I THOUGHT that if I were broadcasting the cluster information (as I would be), that there would be some way of instructing the JNDI connector on the client that there is another place to connect to JNDI. Maybe this isn't really a hornetq question. My problem is that the lookup of JNDI as implemented in hornetq doesn't look like the list of providers in HAJNDI and I am not really clear about how interconnected the JNDI is.
I'll be experimenting with this but it seems that the JNDI service becomes a point failure. Maybe there is a way of configuring JNDI to failover (haven't found that yet). Does the JNDI of hornetq talk to the HAJNDI of JBoss? Can I just aim at the JBoss localhost JNDI?
Some discussion around this would help a lot with the details.
Thanks all
BJ