This content has been marked as final.
Show 1 reply
-
1. Re: JNDI Lookup
manju_rn May 27, 2003 7:46 AM (in response to amaresh)I dunno about ur LocalHome llokup...but for Remote....following works fine
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.NamingContextFactory");
p.put(Context.PROVIDER_URL, "localhost:1099");
and then lookup with the Following
Context jndiContext = getInitialContext();
Object ref = jndiContext.lookup("ejbSample.Bank");
ejbSample.BankHome home = (ejbSample.BankHome)PortableRemoteObject.narrow(ref, ejbSample.BankHome.class);
Hope it Helps