Hello,

I am currently developping a first implementation of HA for SLSB, but I have
some problems most probably comming from my lack of understanding of dynamic
proxies implementation.

The whole picture first...
===========================
I've implemented a MBEAN ("HA Config server") that uses JavaGroups. It reads
a cluster name and node name from its xml config and creates a distributed
hashtable used/known by all nodes (i.e. other HA MBEAN) in the cluster (i.e.
sharing the same cluster name). This seems to work (almost all). For each
application/SLSB bean, an entry is created in this hashtable. The
corresponding
value contains a list of possible targets for this particular bean i.e a
ContainerRemote reference that is serialized in this hasthable.

Then I've modified
org.jboss.ejb.plugins.jrmp13.server.JRMPContainerInvoker.init
in such a way that during this method call (at bean deployement):
        - it contacts is local HA MBEAN service
        - register the fact that a bean of this name and with this application name
exists on this node
                (=> this knowledge is dispatched to all nodes of the cluster)
        - ask for the list of all other nodes (containerinovker) also having this
same app/bean deployed
        - instead of creating a new proxy with a single remoteContainer reference,
pass the complete list of remotecontainers i.e. the reference to all
deployed identical beans on different nodes***

I've then modified
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy so that the end
of the invoke method (when the call is for another JVM), loop around all
possible remotecontainers when a problem is encountered.

Consequently, this first implementation provides HA only at invocation time,
not creation time (could be added  easily).


The problems
============
I seem to have problems to serialize the ContainerRemote objects in my MBEAN
hashtable
structure. I get "java.rmi.MarshalException: Invalid remote object"
exception. Do I need to take particular action to serialize this class?

In fact, I guess the problem is much more in my understanding of the whole
picture: In the proxy, where is the reference to the distant RMI container
when communicating between distant JVM? (see *** above)


This method in GenericProxy:

   public void writeExternal(java.io.ObjectOutput out)
      throws IOException
   {
        out.writeUTF(name);
        out.writeObject(isLocal() ? container : null);
        out.writeLong(containerStartup);
        out.writeBoolean(optimize);
   }



make me think that if we are not local, the container is not seralized. How
is this possible? how can then the proxy, when arrived on the client side,
determine where to direct its calls? I think I am not to far of something
working but my ideas are not that crystal clear now... (and it is the first
time I dig in JBoss code)

I am clearly missing something in the proxy/container invoker thing...

I hope you can give me some clues. I can give you my code if you prefer.

Cheers,



                                Sacha


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to