• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB's lookup error - What does it mean?  RSS feed

 
André Asantos
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am working on the Locator tier and I saw the following method:

/**
*
* <B>Funcionalidade método:</B> TODO: Comentar funcionalidade do método<BR>
*
* @retur Interface EJB de Impressão de Pendencias de Formalização
*/
public SImprimirPendenciasFormalizacaoEJB getSImprimirPendenciasFormalizacaoEJB(){
try{
Object obj = super.getRemoteContext(SImprimirPendenciasFormalizacaoEJBHome.JNDI_NAME);
SImprimirPendenciasFormalizacaoEJBHome home = (SImprimirPendenciasFormalizacaoEJBHome) PortableRemoteObject.narrow(obj, SImprimirPendenciasFormalizacaoEJBHome.class);
return home.create();
} catch (Exception e) {
throw new RuntimeException("EJB's lookup error", e);
}
}
}


 
Suresh Gokarakonda
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method in question is trying to get hold of a instance of a EJB. The part where we use JNDI name for getting hold of EJB instance is generally referred as lookup. Ideally the code should have caught and handled each exception but its catching a generic exception here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!