Skip to content

Commit

Permalink
improves#317; lets just warn if another deployment unit has already r…
Browse files Browse the repository at this point in the history
…egistered an mbean
  • Loading branch information
jstrachan committed May 3, 2013
1 parent 17dc46a commit 589380a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hawtio-core/src/main/java/io/hawt/util/MBeanSupport.java
Expand Up @@ -50,9 +50,11 @@ public void init() throws Exception {
mBeanServer.registerMBean(this, objectName);
} catch (InstanceAlreadyExistsException iaee) {
// Try to remove and re-register
LOG.info("Already registered, trying to re-register MBean " + objectName);
LOG.warn("This mbean is already registered " + objectName + ". There must be multiple deployment units with this mbean inside.");
/*
mBeanServer.unregisterMBean(objectName);
mBeanServer.registerMBean(this, objectName);
*/
}
registered = true;
}
Expand Down

0 comments on commit 589380a

Please sign in to comment.