Skip to content

Commit

Permalink
Rename to 'destroy()' #177
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuss committed Jan 13, 2015
1 parent 75ad0b3 commit c4d3521
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -126,8 +126,8 @@ public <R extends JmxRequest> Object handleRequest(JsonRequestHandler<R> pReques
/**
* Lifecycle method called at the end of life for this object.
*/
public void unregisterFromMBeanNotifications() {
super.unregisterFromMBeanNotifications();
public void destroy() {
unregisterFromMBeanNotifications();
mbeanServers.destroy();
}

Expand Down
Expand Up @@ -88,7 +88,7 @@ private void initPlugins(LogHandler pLogHandler) {
private MBeanPluginContext createMBeanPluginContext() {
return new MBeanPluginContext() {
public ObjectName registerMBean(Object pMBean, String... pOptionalName) throws MalformedObjectNameException, NotCompliantMBeanException, InstanceAlreadyExistsException {
return MBeanServerHandler.this.registerMBean(pMBean,pOptionalName);
return MBeanServerHandler.this.registerMBean(pMBean, pOptionalName);
}

public void each(ObjectName pObjectName, MBeanEachCallback pCallback) throws IOException, ReflectionException, MBeanException {
Expand Down Expand Up @@ -205,7 +205,7 @@ public final void destroy() throws JMException {
}

// Unregister any notification listener
mBeanServerManager.unregisterFromMBeanNotifications();
mBeanServerManager.destroy();
}

/**
Expand Down
Expand Up @@ -53,7 +53,7 @@ private void createHandler() {

@AfterMethod
private void destroy() {
executor.unregisterFromMBeanNotifications();
executor.destroy();
}

@Test
Expand Down

0 comments on commit c4d3521

Please sign in to comment.