@@ -3268,33 +3268,32 @@ these registration behaviors are summarized on the following table:
3268
3268
|===
3269
3269
| Registration behavior | Explanation
3270
3270
3271
- | `REGISTRATION_FAIL_ON_EXISTING `
3271
+ | `FAIL_ON_EXISTING `
3272
3272
| This is the default registration behavior. If an `MBean` instance has already been
3273
3273
registered under the same `ObjectName`, the `MBean` that is being registered will not
3274
3274
be registered and an `InstanceAlreadyExistsException` will be thrown. The existing
3275
3275
`MBean` is unaffected.
3276
3276
3277
- | `REGISTRATION_IGNORE_EXISTING `
3277
+ | `IGNORE_EXISTING `
3278
3278
| If an `MBean` instance has already been registered under the same `ObjectName`, the
3279
3279
`MBean` that is being registered will __not__ be registered. The existing `MBean` is
3280
3280
unaffected, and no `Exception` will be thrown. This is useful in settings where
3281
3281
multiple applications want to share a common `MBean` in a shared `MBeanServer`.
3282
3282
3283
- | `REGISTRATION_REPLACE_EXISTING `
3283
+ | `REPLACE_EXISTING `
3284
3284
| If an `MBean` instance has already been registered under the same `ObjectName`, the
3285
3285
existing `MBean` that was previously registered will be unregistered and the new
3286
3286
`MBean` will be registered in its place (the new `MBean` effectively replaces the
3287
3287
previous instance).
3288
3288
|===
3289
3289
3290
- The above values are defined as constants on the `MBeanRegistrationSupport` class (the
3291
- `MBeanExporter` class derives from this superclass). If you want to change the default
3292
- registration behavior, you simply need to set the value of the
3293
- `registrationBehaviorName` property on your `MBeanExporter` definition to one of those
3290
+ The above values are defined as enums on the `RegistrationPolicy` class.
3291
+ If you want to change the default registration behavior, you simply need to set the value of the
3292
+ `registrationPolicy` property on your `MBeanExporter` definition to one of those
3294
3293
values.
3295
3294
3296
3295
The following example illustrates how to effect a change from the default registration
3297
- behavior to the `REGISTRATION_REPLACE_EXISTING ` behavior:
3296
+ behavior to the `REPLACE_EXISTING ` behavior:
3298
3297
3299
3298
[source,xml,indent=0]
3300
3299
[subs="verbatim,quotes"]
@@ -3307,7 +3306,7 @@ behavior to the `REGISTRATION_REPLACE_EXISTING` behavior:
3307
3306
<entry key="bean:name=testBean1" value-ref="testBean"/>
3308
3307
</map>
3309
3308
</property>
3310
- <property name="registrationBehaviorName " value="REGISTRATION_REPLACE_EXISTING "/>
3309
+ <property name="registrationPolicy " value="REPLACE_EXISTING "/>
3311
3310
</bean>
3312
3311
3313
3312
<bean id="testBean" class="org.springframework.jmx.JmxTestBean">
0 commit comments