1 Reply Latest reply on Jan 11, 2004 2:07 PM by Stjepan Brbot

    Serialization of calls to the container

    nraghuram Newbie

      I wanted to know if jboss serializes all calls to an ejb container. Consider an EJB x with methods a() and b() and two clients c1 and c2.
      x could be a deployed stateless session bean or an entity bean.

      c1 calls x.a() and c2 calls x.b() at the same time.
      will the two calls be serialized ?
      As i understand, all the ejb calls are invoked through jmx and every container is an MBean. However, if there is only one MBean for every deployed EJB does it not imply that ALL calls to any instance of that EJB will be serialized ?
      If my understanding is wrong, please do correct me. However, if it is serialized as i understand, i wanted to know if that is a spec requirement.

        • 1. Re: Serialization of calls to the container
          Stjepan Brbot Newbie

          YES, the access to EJB is serialized! When C1 calls x.a() EJB container will not allow other client to use the same EJB instance until first client not finish with it. But, C2 will not wait until C1 finish with this EJB x instance to offer it to other client, EJB container will offer to C2 another instance of the same x EJB. EJB container in instance pool does have or could have more instances of the same x EJB. EJB container will activate new instance of x EJB if it is needed by additional client (instance pooling).