3 Replies Latest reply on Jan 6, 2005 2:53 PM by Tom Elrod

    concurrency using MBean or POJO handler

    mazz Master

      Now that invocation handlers can be MBeans (feature recently added to the HEAD), I have a question on concurrency.

      How does the connector handle mutiple requests when using either the MBean approach or the "normal" (POJO) invocation handler?

      I assumed that the older way, the Connector would instantiate an invocation handler for each request it got - hence no real threading issues involved there. For each request, a new handler object is created? I don't know if that is true - which is the question. Does the Connector cache a single invocation handler object per subsystem and just synchronize on it or do multiple instances get created?

      Similarly for the MBean approach - if my invocation handler is an MBean, obviously, there's a single MBean instance. How is concurrency handled on the Connector side - or does it rely on the JMX infrastructure and the handler MBean to deal with thread-safety issues?