I don't think the DistributedReplicantManager code is a very good fit for what
you're describing. The DRM is really based on this kind of data structure:
Outer Map
-- Key = ejb1
-- Value = Inner Map
-------------- Key = node1 identifier
-------------- Value = replicant (RMI stub, InvokerLocator, your struct etc.)
-------------- Key = node2 identifier
-------------- Value = replicant for targetting node2
-- Key = ejb2
-- Value = Inner Map
Code that "writes" to the DRM (e.g. an EJB deployment process) doesn't care
about order; it just publishes a replicant for ejb1.
Code that "reads" the DRM usually wants a List of the replicants associated with
ejb1. But DRM provides this by iterating through the Inner Map and ordering the responses
based on the current JGroups view. Thus the ordering is fixed.
Messaging needs:
Map
-- Key = node1
-- Value = List
----------- element = struct for node3
----------- element = struct for node4
Here the code that writes has already prepared a properly ordered list based on a
pluggable policy. The code that "reads" the DRM needs to get that same list.
Trying to change DRM to make a generic class that can handle both use cases is probably
more effort than just creating something new.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978194#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...