[jboss-dev-forums] [Design of Clustering on JBoss] - Re: JBAS-5703 - Make HA-JNDI use wait for first positive res

galder.zamarreno@jboss.com do-not-reply at jboss.com
Fri Apr 3 11:17:32 EDT 2009


"bstansberry at jboss.com" wrote : anonymous wrote : 2. I noted this as a todo in the patch: ResponseFilter/RspFilter API: If needMoreResponses() took response and sender as well, class implementations could be Immutable and same instance could be passed to all lookups. As it is right now, they can't and new instances need to be generated for every lookup.
  | 
  | Having 2 methods lets you filter responses out of the response list while still accepting more responses. To get the same thing out of one method you'd have to change the return type to something beyond simple boolean, perhaps Boolean but better an enum.  This would be a JGroups API change.
  | 

I'm not sure you understood what I meant. I agree that we need 2 methods but why not have needMoreResponses() also receive the response and the sender? The problem right now is that I know whether I need more responses based on what isAcceptable() receives!! This makes the filter stateful, I need to cache a boolean and return that in needMoreResponses(). IOW, what I'm asking is that both methods, which have different functions, to receive both the response and sender. That would simplify the ResponseFilter implementation making it Immutable and hence you can always pass the same instance to the remote method call.

I know it's an API change but something to keep in mind for JGroups 3.0?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223334#4223334

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223334



More information about the jboss-dev-forums mailing list