[jboss-user] [Clustering/JBoss] - Re: HA-JNDI and JNDI for cluster access

bstansberry@jboss.com do-not-reply at jboss.com
Fri Jun 29 17:21:29 EDT 2007


There's a two stage process:

1) The code cycles through the list of URLs you provide, attempting to contact a server and download a naming proxy.  At this point, providing mutliple URLs helps in case1, since if server1 is not available it can try server2, etc.

2) Once you contact a server, there's a big difference between regular JNDI and HA-JNDI.  Now you have a proxy; it's the proxy that communicates with the server to do the lookup. Let's say that server1 was running. Step #1 iterates through the list in order, so server1 will provide the proxy.

a) With regular JNDI, the naming proxy you download will only know how to talk to the server it came from (server1). If server1 subsequently fails, the proxy can't recover; the exception propagates to your code.  You can catch the exception, and do "context = new InitialContext(props)" again to recover, but you have to manage it.

b) With HA-JNDI, the naming proxy you download will have clustering logic and cluster topology info inside of it. It will know that server2 and server3 are all running. When you do a lookup it will load balance requests across them. If a call fails, it can transparently fail over to a different server.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059339#4059339

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059339



More information about the jboss-user mailing list