Monday, August 07, 2006

An in-code solution for JNDI.properties

Found it here Still need to check if it really works...

Properties jndiProps = new Properties(); jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory"); jndiProps.setProperty(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interface");
jndiProps.setProperty(Context.PROVIDER_URL, "jnp://192.168.9.6:1099");
InitialContext ctx = new InitialContext(jndiProps );

0 Comments:

Post a Comment

<< Home