-
1. Re: JNDI on JBoss with Hornetq ( yes again :-) )
mzeijen Mar 29, 2010 3:54 AM (in response to bjchip)This is more a JNDI question then HornetQ specific.
I guess that you have clients that connect from outside of the JBoss AS VM to your HornetQ service.
If I understand you correctly then you are wondering how a JNDI client can resolve the ConnectionFactory or a Queue/Topic Object on the backup system (I presume after the live system failed) if you don't have a reference to that backup system in your JNDI. The anwer is that with normal JNDI you can't resolve the backup server if you don't have it listed in your provider url. The solution with normal JNDI is to list the urls of both the live and backup systems in a comma separated list for the 'java.naming.provider.url' context variable. For example the JNDI provider url property could look like this:
java.naming.provider.url=live.jboss.server:1099,backup.jboss.server:1099
HAJNDI can help you only partially. When your server tries to resolve the ConnectionFactory from a HAJNDI then the HAJNDI provider still needs to be available. So when your live server only provides HAJNDI and it is down then you still won't be able to resolve the ConnectionFactory from the backup server. In that case you still need to list both servers. The nice thing about HAJNDI is that you can also use broadcasting to find the server. That way you don't have to list any servers but just there clustering information. Also if you have a cluster with more then two servers then HAJNDI can help you to locate a service anywhere on the cluster.
If your HornetQ runs standalone then HAJNDI can't help you. The HornetQ server doesn't provide HAJNDI :(.
More info on client (HA)JNDI settings with JBoss can be found here: http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.0/html/Administration_And_Configuration_Guide/ch16s02s02.html The JBoss Enterprise Application Platform documentation is very helpfull in these cases.
-
2. Re: JNDI on JBoss with Hornetq ( yes again :-) )
timfox Mar 29, 2010 4:13 AM (in response to mzeijen)1 of 1 people found this helpfulHA-JNDI is just a JBoss AS service.
If you want it in HornetQ standalone, just define the bean in the beans.xml file and copy the correct jars across. You could do this with any JBoss AS service.
Bear in mind that JBoss AS is just an instance of JBoss microcontainer with a load of services running in it. HornetQ standalone is also an instance of JBoss microcontainer but with less services running it (by default only JNDI and Hornet Serve).
Take a look at the JBoss MC docs for more info.