I am trying to set up a cluster of MBean services
where we have a set of custom MBeans. I would like to
use load balancing and failover for the MBean clients,
but it I realize that jmx/rmi/RMIAdaptor is not "HA
ready". (Using 3.2.1, 3.2.2 and 3.2.3RC1)
Reviewing the docs, I tried to implement this example:
HAPartition myPartition =
(HAPartition)ctx.lookup(�/HAPartition/� +
partitionName);
HARMIServer rmiserver = new
HARMIServerImpl(myPartition, "MyService",
MyService.class, myService);
MyService stub = (MyService)rmiserver.createHAStub(new
RoundRobin());
I am not sure if this is the right way to go, but
screw the torpedoes....
The first thing I ran into is that although
HARMIServerImpl implements createHAStub(), the
interface HARMIServer does not.
So I did this:
Object sourceObject =
ctx.lookup("jmx/rmi/RMIAdaptor");
HAPartition myPartition =
(HAPartition)ctx.lookup("/HAPartition/" +
partitionName);
HARMIServer rmiserver = new
HARMIServerImpl(myPartition, "HARMIAdaptor",
sourceObject.getClass(), sourceObject);
// Here I cast the HARMIServer to a HARMIServerImpl
org.jboss.jmx.adaptor.rmi.RMIAdaptor stub =
(org.jboss.jmx.adaptor.rmi.RMIAdaptor)((HARMIServerImpl)rmiserver).createHAStub(new
RoundRobin());
Then I take the stub and bind it back into JNDI where
I can retrieve it later.
Well it compiled fine......(famous last words), but at
runtine I get this error:
java.lang.IllegalArgumentException: $Proxy25 is not an
interface
at
java.lang.reflect.Proxy.getProxyClass(Proxy.java:340)
at
java.lang.reflect.Proxy.newProxyInstance(Proxy.java:552)
at
org.jboss.ha.framework.server.HARMIServerImpl.createHAStub(HARMIServerImpl.java:184)
at
com.adp.sbs.jboss.ha.HAExporter.start(HAExporter.java:58)
Am I going in the right direction ?
Thanks.
//Nicholas
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user