Skip to content

Support for platform MBeanServer #83

Description

@cruftex

The spec says on page 129:

Simple in-process implementations might simply use the platform MBeanServer, accessed using
ManagementFactory.getPlatformMBeanServer(). The caching implementation must document
how to resolve the MBeanServer that was used to store cache management information.

However, the spec indirectly enforces that a separate MBeanServer is registered, because it wants to retrieve it by the id stored in the property org.jsr107.tck.management.agentId.

The Oracle Coherence does register its beans always with the platform MBeanServer. They sneaked around the TCK shortcoming by providing a server wrapper which constantly produces the id Coherence WrapperMBeanServer for the platform MBeanServer.

All other existing implementations did copy the approach of the RI and provided a custom implementation of MBeanServerBuilder to produce a separate MBeanServer which the TCK can pick up.

The TCK should support the simple approach, registering the bean with the platform MBeanServer, straight forward. All implementations except Oracle produced extra code to register a separate MBeanServer to comply with the TCK, however, the spec does not require that.

At other places the Spec clearly says, that implementation must register with the platform mbean server. See JavaDoc of CacheManager.enableManagement().

Controls whether management is enabled. If enabled the {@link CacheMXBean}
for each cache is registered in the platform MBean server. The platform
MBeanServer is obtained using
{@link ManagementFactory#getPlatformMBeanServer()}.

The Spec should be clear whether this is mandatory or not at all places.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions