[jboss-dev-forums] [Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4919 - ha singletons in heterogenous topologies

galder.zamarreno@jboss.com do-not-reply at jboss.com
Tue Jan 15 15:31:37 EST 2008


"bstansberry at jboss.com" wrote : Crap. I see the following didn't make it into the interface:
  | 
  | /**
  |   |  * Called by the HASingleton to set the name with which the singleton
  |   |  * service is registered with the HAPartition.
  |   |  */
  |   | public void setServiceName(String serviceName);
  |   | 
  |   | public String getServiceName();
  | 
  | Those need to be there, otherwise an impl has no idea how to interact with the DRM.

I guess that's what setManagedSingleton/getManagedSingleton was trying to achieve:

/**
  |     * Called by the HASingleton to provide the election policy a reference to 
  |     * itself.  A policy that was designed to elect a particular kind of singleton
  |     * could downcast this object to a particular type and then access the
  |     * singleton for state information needed for the election decision.
  |     */
  |    void setManagedSingleton(Object singleton);
  | 
  |    Object getManagedSingleton();

Or maybe not. Judging from the javadoc, seems like the aim is different.This method is actually not used anywhere in the code. Shall we swap it for setServiceName/getServiceName? Or shall we keep it and add service name get/set?

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

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



More information about the jboss-dev-forums mailing list