Unique jmx object names with Spring JMX annotations
Hi,
I have a single class that is declared as two beans with two different bean ids.
That class has the following jmx annnotation on it.
Code:
@ManagedResource("foo:type=bar")
However when I start up Spring I get:
Code:
Caused by: javax.management.InstanceAlreadyExistsException: foo:type=bar
How can I get Spring to use the bean id rather than what I supply as a value to the @ManagedResource annotation?
I've already seen the property:
http://static.springframework.org/sp...am es(boolean)
However this is already set to true by default and doesn't work.
Do I need to implement my own ObjectNamingStrategy? If so would someone kindly provide an example?
Much appreciate your help.
Thanks.