0 Replies Latest reply on Oct 23, 2007 5:08 AM by raghu nidagal

    StatelessHandleImpl  caching handle

    raghu nidagal Newbie

      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
      InitialContext ic = null;
      if( jndiEnv != null )
      ic = new InitialContext(jndiEnv);
      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);