I have a JUnit test that needs to bind and lookup things in JNDI. I do not want to have the full JNDI featureset enabled - that is, I don't want the JNDI SPI to try to discovery any remote naming servers and I don't even want the JNDI SPI to open a socket and enable itself to be accessible to remote clients. I want the JUnit to run as fast as possible and not use networking resources if at all possible.
I have jnp.disableDiscovery set to true in my initial context: String ip = InetAddress.getLocalHost( ).getHostAddress( ); | Hashtable env = new Hashtable( ); | env.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" ); | env.put( Context.PROVIDER_URL, "jnp://" + ip ); | env.put( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); | env.put( NamingContext.JNP_DISABLE_DISCOVERY, "true" ); | m_initialContext = new InitialContext( env ); Is there a way to say, "just use an internal JNDI provider without opening server sockets or going out on the network looking for JNDI servers? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3860594#3860594 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3860594 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
