package com.proofpoint.jmx;

import com.google.inject.Binder;
import com.google.inject.Module;
import com.proofpoint.configuration.ConfigurationModule;

import javax.management.MBeanServer;
import java.lang.management.ManagementFactory;

public class JMXModule
        implements Module
{
    public void configure(Binder binder)
    {
        binder.bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
        ConfigurationModule.bindConfig(binder, JMXConfig.class);
    }
}


@@ -88,16 +88,49 @@
 Module;%0A
+import com.google.inject.Scopes;%0A
 import c
@@ -178,16 +178,16 @@
 Module;%0A
-
 %0Aimport 
@@ -315,16 +315,30 @@
 odule%0A%7B%0A
+    @Override%0A
     publ
@@ -376,16 +376,16 @@
 )%0A    %7B%0A
-
         
@@ -471,16 +471,74 @@
 ver());%0A
+        binder.bind(JMXAgent.class).in(Scopes.SINGLETON);%0A
         

Make sure JMXAgent gets bound