Unique jmx object names with Spring JMX annotations
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.
However when I start up Spring I get:
How can I get Spring to use the bean id rather than what I supply as a value to the @ManagedResource annotation?
Caused by: javax.management.InstanceAlreadyExistsException: foo:type=bar
I've already seen the property:
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.