[jboss-user] [Beginner's Corner] - Re: JNDI Standalone client
Wolfgang Knauf
do-not-reply at jboss.com
Mon Apr 4 08:51:27 EDT 2011
Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] created the discussion
"Re: JNDI Standalone client"
To view the discussion, visit: http://community.jboss.org/message/597560#597560
--------------------------------------------------------------
Hi,
for a standalone client, you have to provide a configuration for the InitialContext:
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
InitialContext initialContext = new InitialContext(props);
Do you want to perform a lookup in global JNDI or do you lookup something in your "Environment naming context"?
Best regards
Wolfgang
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597560#597560]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110404/bf553874/attachment-0001.html
More information about the jboss-user
mailing list