jsr107 / jsr107spec

JSR107 Cache Specification
Apache License 2.0
413 stars 164 forks source link

Contradictory JMX ObjectName Requirements #329

Closed chrisdennis closed 8 years ago

chrisdennis commented 9 years ago

The javadoc for CacheManager.enableManagement(...) reads:

Each cache's management object must be registered with an ObjectName that is unique and has the following type and attributes: Type: javax.cache:type=Cache Required Attributes:

  • CacheManager the name of the CacheManager
  • Cache the name of the Cache

The javadoc for CacheMXBean however, reads:

Each cache's management object must be registered with an ObjectName that is unique and has the following type and attributes: Type: javax.cache:type=CacheConfiguration Required Attributes:

  • CacheManager the URI of the CacheManager
  • Cache the name of the Cache

The TCK appears to enforce neither of these contracts however. It enforces (my wording obviously)

Each cache's management object must be registered with an ObjectName that is unique and has the following type and attributes: Type: javax.cache:type=CacheConfiguration Required Attributes:

  • CacheManager the URI of the CacheManager (with any characters that would result in an illegal ObjectName substituted with ".")
  • Cache the name of the Cache (with any characters that would result in an illegal ObjectName substituted with ".")

I think it would make sense for us to normalize on the definition used by the TCK - although it may be prudent to more explicitly spell out the set of illegal characters. There also some sample code in the spec document that needs to be updated to match these new contracts.

P.S. The same problem exists for the statistics bean registration rules too (absent the type confusion).

gregrluck commented 8 years ago

todo update_spec