JDK-6175387 : Add new 'OnUnregister' persistPolicy value to Model MBean descriptor
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2004-10-07
  • Updated: 2017-05-16
  • Resolved: 2005-09-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b55Fixed
Related Reports
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
Currently the Model MBean persistPolicy values are:

Never
OnUpdate
OnTimer
NoMoreOftenThan
Always

I'd like the new value "OnUnregister" to be added. This policy would specify that the store operation would be triggered once the MBean is unregistered from the MBenServer. I know one can implement this functionality by overriding the MBeanRegistration pre/postDeregister method to trigger the store. However it seems that for consistency purposes and ease of use this should be added as one of the Model MBean persitPolicy.

JUSTIFICATION :
There are a lot of cases, where one only wants to persist the MBean state once at the time it is no longer used.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Persist the MBean state by triggering its store method upon MBean unregistration.
ACTUAL -
This policy does not currently exist.

CUSTOMER SUBMITTED WORKAROUND :
Use pre/postDeregister methods to trigger persistence.
###@###.### 10/7/04 08:19 GMT

Comments
EVALUATION This is just a spec change at the moment since RequiredModelMBean does not support persistence in the Reference Implementation at present. ###@###.### 10/7/04 08:22 GMT In fact DescriptorSupport.isValid checks that the value of PersistPolicy is one of the existing values. So this is not just a spec change. ###@###.### 2005-06-22 09:59:26 GMT
07-10-2004