title: JMX/RMI issues when starting broker
body: <p>Hello fellow stackoverflowers.</p>
  
  <p>I have been getting a quite nasty error while trying to start up my brokers with ActiveMQ. It seems that, for some reason, the management context tries to start up something that is already registered. The top of the stack trace reads:</p>
  
  <pre><code>[SpringOsgiExtenderThread-127] DEBUG org.apache.activemq.broker.jmx.ManagementContext - Failed to create local registry
  java.rmi.server.ExportException: internal error: ObjID already in use
      at sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:169)
      at sun.rmi.transport.Transport.exportObject(Transport.java:74)
      at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:229)
      at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
      at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
      at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
      at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
      at sun.rmi.registry.RegistryImpl.&lt;init&gt;(RegistryImpl.java:78)
      at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
      at org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:407)
      at org.apache.activemq.broker.jmx.ManagementContext.findTigerMBeanServer(ManagementContext.java:352)
      at org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:319)
      at org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:169)
      at org.apache.activemq.broker.jmx.ManagementContext.start(ManagementContext.java:87)
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:454)
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:420)
  </code></pre>
  
  <p>Does anyone have any idea what might be happening?</p>