United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6175387 Add new 'OnUnregister' persistPolicy value to Model MBean descriptor
JDK-6175387 : Add new 'OnUnregister' persistPolicy value to Model MBean descriptor

Details
Type:
Enhancement
Submit Date:
2004-10-07
Status:
Resolved
Updated Date:
2010-07-29
Project Name:
JDK
Resolved Date:
2005-09-30
Component:
core-svc
OS:
solaris_8
Sub-Component:
javax.management
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:

Sub Tasks

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
                                     
2004-10-07



Hardware and Software, Engineered to Work Together