Performance
The obvious concern given the design described above is performance. Can the MBean server handle the load of all the invocations being passed to it? And to give you the answer right awayyes, it can.
Before moving forward with the vision of JMX-based microkernel architecture, the JBoss development team measured the basic invocation throughput of the existing JMX implementations to get a rough idea of what kind of performance was achievable with the MBean server. The results varied quite a lot, from decent to too slow. There seemed to be differences depending on what type of MBeanstandard or dynamicwas used (standard MBean invocations turning out to be a major bottleneck). Also, the performance between different JMX implementations varied greatly regardless of the MBean types.
Standard MBean invocations performed considerably slower than their dynamic counterpartspartly, no doubt, because the early implementers didn't consider performance as one of the main requirements for an JMX implementation, and partly because the standard MBean invocation required the use of reflection, whereas the dynamic did not. In many JVM implementations, the reflection system had less-than-stellar performance. Also, when reflection was being used, some very common optimization techniques seemed to be lacking.
The early prototypes of JBossMXthe JBoss JMX implementationshowed that the invocation performance could be improved considerably. Caching the reflection Method objects in itself yields a performance increase of an order of magnitude (an obvious optimization). Furthermore, avoiding reflection altogetherby generating the classes responsible for method dispatchingyields a performance increase of another order of magnitude. The JBossMX project uses the Apache Byte Code Engineering Library (BCEL) to implement this optimization. The number of standard MBean invocations per second on the test machine (see note below) go from approximately 13,000 invocations per second (Sun Reference Implementation) up to 1,000,000 invocations per second (JBossMX). Fast enough even for a J2EE application server.
NOTE
Test machine: Windows 2000, 800 MHz Pentium III processor with 256MB memory and Sun JDK 1.3.1_01.