1 Reply Latest reply on Jun 24, 2003 1:20 PM by Viet

    How is concurrency handled?

    jkester Newbie

      Hello

      just a question which probably is more jboss related. Hope it is not out of place here.

      How is concurrency assured? Two users call the same module, for instance FaqModule. Inside the faqmodule are private non-static members of which the depthMax is changeable via the jmx-console.

      How does the MBean server handle two concurrent requests? Will it make a copy of the original MBean configuration/use an instance from pooling and then use that to serve the new request?
      Or are they sharing the same instance, just running the methods in own environment but sharing the same member variables?

      Regards, Jan.

        • 1. Re: How is concurrency handled?
          Viet Master

          it is shared. so it's up to the mbean to sync variables.

          usually problem might arise when the variables are write accessed, so :

          if the variable is atomic, nothing is done

          if the variable is a collection or an aggregate :
          .either the collection.aggregate is synchronised
          .either we use a local copy

          julien