[jboss-user] [Clustering/JBoss] - Re: Invocation of startSingleton()

ablevine1 do-not-reply at jboss.com
Wed May 20 15:23:30 EDT 2009


After further investigation it looks like the HAPartition is never being set.  If I override the method in setHAPartiton in org.jboss.ha.jmx.AbstractHAServiceMBeanSupport like so:


  |     public void setHAPartition(HAPartition partition)
  |     {
  |         log.info("GOT PARTITION: " + partition);
  |         super.setHAPartition(partition);
  |     }
  | 

I never see my "GOT PARTITION" statement appear in the log.  
Since the partition is not being set org.jboss.ha.jmx.AbstractHAServiceMBeanSupport.startService fails because it throws an exception if the HAPArtition has not been set.  
Is there something I can add to my config to make sure that the HAPartition is set?  

Here is my config:

  | <server>
  | 
  |     <!-- This MBean is an example of a clustered singleton -->
  |     <mbean code="com.squaretrade.semaphore.SemaphoreService"
  |            name="squaretrade:service=Semaphore">
  |     </mbean>
  | 
  | 	 <!-- This HASingletonController manages the cluster Singleton -->
  |      <mbean code="org.jboss.ha.singleton.HASingletonController"
  | 		    name="squaretrade:service=SemaphoreServiceProxy">
  |          <attribute name="HAPartition"><inject bean="HAPartition"/></attribute>
  |          <attribute name="TargetName">squaretrade:service=Semaphore</attribute>
  | 	 <!-- Methods to invoke when become master / stop being master -->
  | 	 <attribute name="TargetStartMethod">startSingleton</attribute>
  | 	 <attribute name="TargetStopMethod">stopSingleton</attribute>
  |      </mbean>
  | 
  | </server>
  | 
I tried adding

  |          <depends>HAPartition</depends>
  | 
to the controller but that did not seem to make any difference

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

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



More information about the jboss-user mailing list