• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in JNDI lookup...pls help  RSS feed

 
Tushar Anandani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well...I have a DACInterface which calls the entity bean with the help of a Resource Locator.The problem is that it is unable to lookup the JNDI name for the entity bean.I have added the references to the DACInterface...and checked for everything in the deployment descriptor.


public EJBLocalHome getLocalHome(String localEjbJNDIName) throws IdealCoreSysException {

EJBLocalHome home = null;

try {
if (cacheLocalHome.containsKey(localEjbJNDIName)) {
home = (EJBLocalHome) cacheLocalHome.get(localEjbJNDIName);
} else {
// Append java:comp/env/ with jndi name as lookup is local
home = (EJBLocalHome) initialContext.lookup("java:comp/env/" + localEjbJNDIName);
cacheLocalHome.put(localEjbJNDIName, home);
}
} catch (NamingException namingException) {
throw new IdealCoreSysException(123, namingException);
}

return home;
}

Can anyone suggest where the error might be...
 
Dini Bang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good question.......
Ask Nandkishore..for short n sweet n fast response
 
Tushar Anandani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even he can't solve this...so need some help!!!
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where have you configured the jndi names for your beans? Which app server are you using?
 
Tushar Anandani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got the solution...to the problem ..thanks for the replies..I re-deployed the code and it worked!!! I am using WAS 6.0
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!