User: slaboure
  Date: 02/01/13 09:18:14

  Modified:    src/main/org/jboss/ha/framework/server
                        FarmMemberService.java
  Log:
  Make the farming stuff partition-dependant
  
  Revision  Changes    Path
  1.5       +26 -15    
jbossmx/src/main/org/jboss/ha/framework/server/FarmMemberService.java
  
  Index: FarmMemberService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/FarmMemberService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FarmMemberService.java    2002/01/03 04:00:52     1.4
  +++ FarmMemberService.java    2002/01/13 17:18:14     1.5
  @@ -42,7 +42,7 @@
    * </ul>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>
  - * @version $Revision: 1.4 $ <p>
  + * @version $Revision: 1.5 $ <p>
    *
    * <b>Revisions:</b> <p>
    *
  @@ -56,9 +56,10 @@
   
      // Attributes ----------------------------------------------------
   
  -   private static ObjectName sFarmMemberService = null;
  -   private static ObjectName sDeployerService = null;
  -   private static ObjectName sClusterPartitionService = null;
  +   protected ObjectName sFarmMemberService = null;
  +   protected ObjectName sDeployerService = null;
  +   protected ObjectName sClusterPartitionService = null;
  +   protected String backgroundPartition = "DefaultPartition";
      
      protected final static String SERVICE_NAME = "FarmMemberService";
      
  @@ -280,6 +281,20 @@
         return null;
      }
      
  +   public String getPartitionName ()
  +   {
  +      return this.backgroundPartition;
  +   }
  +   
  +   public void setPartitionName (String partitionName)
  +   {
  +      if ((this.getState () != this.STARTED) && (this.getState () != this.STARTING))
  +      {
  +         this.backgroundPartition = partitionName;
  +         
  +      }
  +   }
  +
      // MBeanRegistration implementation ----------------------------------------
   
      /**
  @@ -295,7 +310,10 @@
         mServer = pServer;
   
         log.info("Farm Member Service MBean online");
  -      return new ObjectName( OBJECT_NAME );
  +      
  +      this.sFarmMemberService = new ObjectName( OBJECT_NAME + 
",Partition="+this.backgroundPartition );
  +      
  +      return this.sFarmMemberService;
      }
   
      // Service implementation ----------------------------------------
  @@ -308,6 +326,9 @@
      protected void startService()
         throws Exception
      {
  +      this.sDeployerService = new ObjectName( 
"jboss.system:service=ServiceDeployer" );
  +      this.sClusterPartitionService = new ObjectName( "jboss:service=" + 
this.backgroundPartition );
  +
         log.debug( "registerRPCHandler" );
         HAPartition lHAPartition = (HAPartition) mServer.getAttribute(
            sClusterPartitionService,
  @@ -352,16 +373,6 @@
         }
         e.printStackTrace();
         log.error(e);
  -   }
  -
  -   static {
  -      try {
  -         sFarmMemberService = new ObjectName( OBJECT_NAME );
  -         sDeployerService = new ObjectName( "jboss.system:service=ServiceDeployer" 
);
  -         sClusterPartitionService = new ObjectName( 
"jboss:service=DefaultPartition" );
  -      }
  -      catch( JMException jme ) {
  -      }
      }
   
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to