This content has been marked as final.
Show 3 replies
-
1. Re: How to lookup for a bean
rrusinkiewicz Oct 31, 2006 3:32 AM (in response to rrusinkiewicz)Additional information:
I'm using Session beans 3.0
Web application and EJB's are deployed in separate ear files. -
2. Re: How to lookup for a bean
rrusinkiewicz Oct 31, 2006 7:01 AM (in response to rrusinkiewicz)I adjusted my client code to the following:
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
environment.put(Context.PROVIDER_URL, "jnp://localhost:1099");
InitialContext ctx = new InitialContext(environment);
cal = (ApptransCalculatorLocal) ctx.lookup(
"ejb1/ApptransCalculator/local");
But it still returns null as cal -
3. Re: How to lookup for a bean
rrusinkiewicz Oct 31, 2006 9:46 AM (in response to rrusinkiewicz)If you use 2 ear files than do not use local interface but remote