Singleton MBean lookup fails after failover ( using singleto
milmber Aug 25, 2005 7:31 AMI'm running JBoss 4.0.2 under linux with JDK1.5.
I've implemented a Singleton MBean which I am looking up using the SingletonRMI Adaptor as explained in the wiki:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHASingletonRemoteAccess
This all works fine in my clustered environment up the point where I kill the master node on which my singletonMBeans are resident.
I can see my SingletonMBean's *jumping* to the other node correctly except that when I try to look them up in HAJNDI again, the lookup throws a exception:
"javax.naming.NameNotFoundException: jmx/invoker/SingletonRMIAdaptor"
So assuming the SingletonRMIAdaptor...was not started up on this node when the master node died.
Am I correct in deploying the "singleton-jmx-adapter-service.xml" in "<jboss_home>/server/all/deploy-hasingleton/" directory on both nodes in the cluster?
I've looked at the JDNI tree using JNDIView in the JMX console and it *seems* that "jmx/invoker/SingletonRMIAdaptor" is there in the JNDI tree:
Before failover on the master node:
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- SingletonRMIAdaptor (proxy: $Proxy37 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- RMIAdaptor (proxy: $Proxy38 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
After failover on the new master node:
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- SingletonRMIAdaptor (proxy: $Proxy205 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- RMIAdaptor (proxy: $Proxy37 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
Is there anything else I could try?
Also - if I'm using the MBeanServerConnection class instead of the RMIAdaptor class for lookups in the case of the SingletonRMIAdaptor - does this make a difference?