Currently 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.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885757#3885757
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885757
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user