Skip to content

Commit db2c807

Browse files
Cikeysnicoll
authored andcommitted
Fix deprecated property in MBeanExporter documentation
1 parent a45bce1 commit db2c807

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/docs/asciidoc/integration.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3268,33 +3268,32 @@ these registration behaviors are summarized on the following table:
32683268
|===
32693269
| Registration behavior | Explanation
32703270

3271-
| `REGISTRATION_FAIL_ON_EXISTING`
3271+
| `FAIL_ON_EXISTING`
32723272
| This is the default registration behavior. If an `MBean` instance has already been
32733273
registered under the same `ObjectName`, the `MBean` that is being registered will not
32743274
be registered and an `InstanceAlreadyExistsException` will be thrown. The existing
32753275
`MBean` is unaffected.
32763276

3277-
| `REGISTRATION_IGNORE_EXISTING`
3277+
| `IGNORE_EXISTING`
32783278
| If an `MBean` instance has already been registered under the same `ObjectName`, the
32793279
`MBean` that is being registered will __not__ be registered. The existing `MBean` is
32803280
unaffected, and no `Exception` will be thrown. This is useful in settings where
32813281
multiple applications want to share a common `MBean` in a shared `MBeanServer`.
32823282

3283-
| `REGISTRATION_REPLACE_EXISTING`
3283+
| `REPLACE_EXISTING`
32843284
| If an `MBean` instance has already been registered under the same `ObjectName`, the
32853285
existing `MBean` that was previously registered will be unregistered and the new
32863286
`MBean` will be registered in its place (the new `MBean` effectively replaces the
32873287
previous instance).
32883288
|===
32893289

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
32943293
values.
32953294

32963295
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:
32983297

32993298
[source,xml,indent=0]
33003299
[subs="verbatim,quotes"]
@@ -3307,7 +3306,7 @@ behavior to the `REGISTRATION_REPLACE_EXISTING` behavior:
33073306
<entry key="bean:name=testBean1" value-ref="testBean"/>
33083307
</map>
33093308
</property>
3310-
<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING"/>
3309+
<property name="registrationPolicy" value="REPLACE_EXISTING"/>
33113310
</bean>
33123311
33133312
<bean id="testBean" class="org.springframework.jmx.JmxTestBean">

0 commit comments

Comments
 (0)