The getEJBObject() in StatelessHandleImpl has the following code.
Does this mean that caching the handle is bad for stateless session beans.
public EJBObject getEJBObject()
throws ServerException
{
try
{
InitialContext ic = null;
if( jndiEnv != null )
ic = new InitialContext(jndiEnv);
else
ic = new InitialContext();
EJBHome home = (EJBHome) ic.lookup(jndiName);
Class type = home.getClass();
Method method = type.getMethod("create", new Class[0]);
return (EJBObject) method.invoke(home, new Object[0]);
}
catch (Exception e)
{
throw new ServerException("Could not get EJBObject", e);
}
}