HA JNDI Configuration
dhunter21 Jul 20, 2005 2:32 PMCurrently I have HA JNDI working in a cluster by hardcoding the properties, i.e.:
publicstatic InitialContext getHAInitialContext() throws NamingException { if (props == null) { props = new Properties(); props.put(InitialContext.PROVIDER_URL, "jnp://localhost:1100"); } return new InitialContext(props); }
I would like to not have to hardcode this information, but keep it in the jndi.properties file. If I create a jndi.properties with the content:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1100
And place this property within each of our sar and war files we deploy, several Jboss services do not start:
[java] --- MBeans waiting for other MBeans --- [java] ObjectName: jboss:service=HASessionState [java] State: FAILED [java] Reason: javax.naming.NameAlreadyBoundException [java] I Depend On: [java] jboss:service=DefaultPartition [java] ObjectName: jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory [java] State: FAILED [java] Reason: javax.naming.NameAlreadyBoundException [java] I Depend On: [java] jboss:service=invoker,type=jrmp [java] jboss.jmx:type=adaptor,name=Invoker [java] Depends On Me: [java] jboss.admin:service=PluginManager [java] --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- [java] ObjectName: jboss:service=HASessionState [java] State: FAILED [java] Reason: javax.naming.NameAlreadyBoundException [java] I Depend On: [java] jboss:service=DefaultPartition [java] ObjectName: jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory [java] State: FAILED [java] Reason: javax.naming.NameAlreadyBoundException [java] I Depend On: [java] jboss:service=invoker,type=jrmp [java] jboss.jmx:type=adaptor,name=Invoker [java] Depends On Me: [java] jboss.admin:service=PluginManager
I'm sure I'm either doing something wrong, but can someone explain how I can use the jndi.properties files properly in an HA-JNDI situation?
Thanks in advance.