I had a look at the DRM code and was able to refactor it into an abstract version that can
easily be subclassed with a version meant to integrate with your ClusteredPostOffice.
So there are some useful classes from the AS for use on the server side. I created some
UML for this, but the free version of the plugin wouldn't export an image :(
1) (impl of) DRM. DRM basically maintains a distributed version of a Map<String key,
Map<String nodeId, Object replicant>>, plus registration/notification of
listeners when the data in the map changes. The replicant in the map is whatever you need;
in the Remoting case it would be an InvokerLocator. DRM also calculates a hash of the
replicants associated with a key; this hash is meant to be passed back and forth between
the client and server; an out-of-date hash from the client tells the server it needs to
send an updated cluster topology.
2) An HATarget instance listens to the DRM for changes to a given key and exposes the
current hash and list of replicants.
3) ReplicantsManagerInterceptor is a server-side AOP interceptor that compares the hash
sent by the client to the one held by the HATarget. If mismatch, get the current replicant
list from target and packages it with the response.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976875#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...