I happen to notice this in EJBContextImpl.java:
public Object lookup(String name) {
Object o = null;
try {
if( initialContext == null ) {
initialContext = new InitialContext();
}
// name is relative to the private component namespace
o = initialContext.lookup("java:comp/env/" + name);
} catch(Exception e) {
throw new IllegalArgumentException(e);
}
return o;
}
It is possible that there exists a resource at name "java:comp/env/null"
and this is a valid resource name. Right now in glassfish
SessionContext.lookup(null) will return such a resource, rather than an
IllegalArgumentException.
Thanks.
-- Cheng