Open GoogleCodeExporter opened 9 years ago
Also, the following exception crops up during the execution of that test:
2011-11-07 11:20:07.464/6.839 Oracle Coherence GE 3.7.0.2 <Error>
(thread=Invocation:Management, member=2):
(Wrapped) javax.management.InstanceAlreadyExistsException:
Coherence:type=Service,name=TestDistributedService,nodeId=4
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
at com.tangosol.coherence.component.net.management.gateway.Local.registerModelMBean(Local.CDB:49)
at com.tangosol.coherence.component.net.management.Connector.onRegister(Connector.CDB:43)
at com.tangosol.coherence.component.net.management.Connector$Register.run(Connector.CDB:2)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.InvocationService.onInvocationMessage(InvocationService.CDB:6)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.InvocationService$InvocationMessage.onReceived(InvocationService.CDB:32)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:33)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:637)
Caused by: javax.management.InstanceAlreadyExistsException:
Coherence:type=Service,name=TestDistributedService,nodeId=4
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
at com.tangosol.coherence.component.net.management.gateway.Local.registerModelMBean(Local.CDB:23)
... 8 more
Original comment by ruben...@gmail.com
on 7 Nov 2011 at 2:15
I have replaced the original shutdown method with this one (hard stop) and now
seems to be working:
Class cls = classLoader.loadClass("com.tangosol.net.CacheFactory");
Class cls2 = classLoader.loadClass("com.tangosol.coherence.component.util.SafeCluster");
Method m1 = cls.getDeclaredMethod("getCluster");
Method m2 = cls2.getDeclaredMethod("shutdown");
Object invoke = m1.invoke(null);
CacheFactory.log("CLASS: "+invoke.getClass().toString(), CacheFactory.LOG_INFO);
m2.invoke(invoke);
CacheFactory.log("getCluster().stop() called", CacheFactory.LOG_INFO);
Does it worth to add a new "stop()" method to CoherenceClassloaderLifecycle ?
Original comment by mikel.al...@gmail.com
on 8 Nov 2011 at 5:09
amendment:
Method m2 = cls2.getDeclaredMethod("shutdown");
should be
Method m2 = cls2.getDeclaredMethod("stop");
Original comment by mikel.al...@gmail.com
on 8 Nov 2011 at 5:41
Original issue reported on code.google.com by
ruben...@gmail.com
on 7 Nov 2011 at 10:25