@@ -3440,33 +3440,32 @@ The following table summarizes these registration behaviors:
3440
3440
|===
3441
3441
| Registration behavior | Explanation
3442
3442
3443
- | `REGISTRATION_FAIL_ON_EXISTING `
3443
+ | `FAIL_ON_EXISTING `
3444
3444
| This is the default registration behavior. If an `MBean` instance has already been
3445
3445
registered under the same `ObjectName`, the `MBean` that is being registered is not
3446
3446
registered, and an `InstanceAlreadyExistsException` is thrown. The existing
3447
3447
`MBean` is unaffected.
3448
3448
3449
- | `REGISTRATION_IGNORE_EXISTING `
3449
+ | `IGNORE_EXISTING `
3450
3450
| If an `MBean` instance has already been registered under the same `ObjectName`, the
3451
3451
`MBean` that is being registered is not registered. The existing `MBean` is
3452
3452
unaffected, and no `Exception` is thrown. This is useful in settings where
3453
3453
multiple applications want to share a common `MBean` in a shared `MBeanServer`.
3454
3454
3455
- | `REGISTRATION_REPLACE_EXISTING `
3455
+ | `REPLACE_EXISTING `
3456
3456
| If an `MBean` instance has already been registered under the same `ObjectName`, the
3457
3457
existing `MBean` that was previously registered is unregistered, and the new
3458
3458
`MBean` is registered in its place (the new `MBean` effectively replaces the
3459
3459
previous instance).
3460
3460
|===
3461
3461
3462
- The values in the preceding table are defined as constants on the `MBeanRegistrationSupport` class (the
3463
- `MBeanExporter` class derives from this superclass). If you want to change the default
3464
- registration behavior, you need to set the value of the
3465
- `registrationBehaviorName` property on your `MBeanExporter` definition to one of those
3462
+ The values in the preceding table are defined as enums on the `RegistrationPolicy` class.
3463
+ If you want to change the default registration behavior, you need to set the value of the
3464
+ `registrationPolicy` property on your `MBeanExporter` definition to one of those
3466
3465
values.
3467
3466
3468
3467
The following example shows how to change from the default registration
3469
- behavior to the `REGISTRATION_REPLACE_EXISTING ` behavior:
3468
+ behavior to the `REPLACE_EXISTING ` behavior:
3470
3469
3471
3470
====
3472
3471
[source,xml,indent=0]
@@ -3480,7 +3479,7 @@ behavior to the `REGISTRATION_REPLACE_EXISTING` behavior:
3480
3479
<entry key="bean:name=testBean1" value-ref="testBean"/>
3481
3480
</map>
3482
3481
</property>
3483
- <property name="registrationBehaviorName " value="REGISTRATION_REPLACE_EXISTING "/>
3482
+ <property name="registrationPolicy " value="REPLACE_EXISTING "/>
3484
3483
</bean>
3485
3484
3486
3485
<bean id="testBean" class="org.springframework.jmx.JmxTestBean">
0 commit comments