This content has been marked as final.
Show 2 replies
-
1. Re: Accessing EJB from a Java standalone app with main()
nickman Jul 9, 2004 2:51 PM (in response to cspit)cspit;
When you access the JNDI context from a remote JVM, you need to provide a few extra parameters when you create the initial context.
Example:Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); p.put(Context.PROVIDER_URL, "jnp://myhost:1099"); Context ctx = new InitialContext(p);
Also put <jboss-home>/client/jbossall-client.jar in your client's classpath.
//Nicholas -
2. Re: Accessing EJB from a Java standalone app with main()
cspit Jul 9, 2004 7:11 PM (in response to cspit)Great! Worked straight away...
Thanks a million.