-
Type:
Task
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Complete
-
Affects Version/s: 2.2.5
-
Fix Version/s: 3.0 RC1
-
Component/s: Documentation, JMX Support
-
Labels:
-
Environment:java6
The default namingStrategy IntegrationMBeanExporter results in a random, ambiguous JMX object name each time the application is started.
E.g. <int-jmx:mbean-export /> results in org.springframework.integration.monitor:name=org.springframework.integration.monitor.IntegrationMBeanExporter#0#4be82f4d-4654-4adf-8e70-f4866137ac2b,type=IntegrationMBeanExporter
This is random each time the app is deployed, it is not possible to reference this object by name/type from any control or monitor script, or even within the app itself. (e.g. create a shutdownChannel with int-jmx:operation-invoking-channel-adapter calling stopActiveComponents on IntegrationMBeanExporter)
Workaround is to define the bean with namingStrategy set to IdentityNamingStrategy:
<bean id="integrationMBeanExporter" class="org.springframework.integration.monitor.IntegrationMBeanExporter"> <property name="namingStrategy"> <bean class="org.springframework.jmx.export.naming.IdentityNamingStrategy"/> </property> </bean>
One would expect this or any non-random naming strategy as default, e.g. objectName=org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter