Vote count:
0
do you know why I'm getting this exception ?
String url = "corbaloc:iiop:localhost:2809";
String initial = "com.ibm.websphere.naming.WsnInitialContextFactory";
String jndi = "ejblocal:my/ejb/PeriodoBO";
Hashtable<String, String> pdEnv = new Hashtable<String, String>();
pdEnv.put("java.naming.provider.url", url);
pdEnv.put("java.naming.factory.initial", initial);
Context initialContext = new InitialContext(pdEnv);
try{
Object ejbHome = initialContext.lookup(jndi); // <-- here
Object obj = PortableRemoteObject.narrow(ejbHome, PeriodoBO.class);
}catch(NamingException e){
System.err.println(e.toString());
}
I'm sure that the JNDI is ok, I was struggling to get it (What's the default JNDI name of an EJB in Websphere Application Server 7 (WAS)?).
Could you help me please?
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire