public Object lookup(FacesContext facesContext,String name){
  Object object=null;
  try {
    InitialContext context=new InitialContext();
    object=context.lookup(name);
  }
 catch (  NamingException ne) {
    if (LOGGER.isLoggable(Level.WARNING)) {
      LOGGER.log(Level.WARNING,"Unable to lookup: " + name,ne);
    }
    if (facesContext.isProjectStage(ProjectStage.Development)) {
      facesContext.addMessage(null,new FacesMessage("Unable to lookup: " + name,"Unable to lookup: " + name));
    }
  }
  return object;
}

public Object lookup ( FacesContext facesContext , String name ) { Object object = null ; try { InitialContext context = new InitialContext ( ) ; object = context . lookup ( name ) ; } catch ( NamingException ne ) { if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . log ( Level . WARNING , "Unable to lookup: " + name , ne ) ; } if ( facesContext . isProjectStage ( ProjectStage . Development ) ) { facesContext . addMessage ( null , new FacesMessage ( "Unable to lookup: " + name , "Unable to lookup: " + name ) ) ; } } return object ; }
look up the given object using its jndi name .
