1 Reply Latest reply on Dec 5, 2002 5:09 AM by adrian.brock

    EJB Pool

    stonebat

      Those *pooled* EJBs are already assigned its context, EntityContext for Entity EJB and SessionContext for Session EJB. When EJBs are in Ready state, their business methods can be executed by their clients. When the EJBs return back to their Pool, each EJB still has its original context where the context carries client specific information. Why not just remove the context? (BTW, COM+ removes context when its server object goes back to its pool.)

      My guess is that EJB pool is per client. So each client has its own pool where all EJBs in a pool carries context info that is unique to each client. For example, EJB1 instance was executed, then went back to its pool. This instance cannot be used by any other than its original client later.

      I really want to know what's really going on. Can someone give me definite answer? Thanks.

        • 1. Re: EJB Pool

          Entity beans have state from the persistent store not
          the client.
          Stateless Session Beans should not have client state.
          Stateful Session Beans are not returned to a pool,
          they are put in a cache while they are in use by a client.

          Regards,
          Adrian