On Tiger, activemq always creates a rmi connector on port 1099 no matter what I do with -Djavax.management... and <managementContext/>
In particular, setting createConnector="false" should prevent AMQ from setting up its own connector, but it does not.
The problem is in the findMBeanServer() method:
if (result == null && createMBeanServer) {
result = createMBeanServer();
}
else {
createConnector(result);
}
result is not null on Tiger with useJmx="true", and createConnector is not protected by if(createConnector) like it is on the non-Tiger flow.
The fix (I think) is simply to do this:
if (result == null && createMBeanServer) { result = createMBeanServer(); } }
else {
if(createConnector){
createConnector(result);
}
}
BTW could you double check my version of your patch works - I only create a connector if result != null and createConnector is true.