I looked into
DefaultManagementNameStrategy and DefaultManagementNamingStrategy. The first
one can be set on camel context and the last one is used to inject beans.
At the end no one helped here but on looking into their code i found that
the endoints method "getEndpointKey()" is used to create the jmx name.
I decided to overrride it:
@Override
public final String getEndpointKey() {
String originalKey = super.getEndpointKey();
String lastPart = originalKey.substring(originalKey.lastIndexOf('/')
+ 1);
if (lastPart != null && lastPart.trim().length() > 0) {
return lastPart;
} else {
return originalKey;
}
}
In my special case the endpoint's uri is checked against a pattern (there is
always a "lastPart"). But the additional checks could not hurt.
--
View this message in context:
http://camel.465427.n5.nabble.com/Setting-jmx-object-name-name-myName-tp5754000p5754118.html
Sent from the Camel - Users mailing list archive at Nabble.com.