User: patriot1burke
  Date: 01/12/31 12:41:17

  Modified:    src/main/org/jboss/ha/framework/server
                        ClusterPartitionMBean.java ClusterPartition.java
  Log:
  switch back to create/start instead of crazy mbean refs
  
  Revision  Changes    Path
  1.5       +2 -5      
jbossmx/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java
  
  Index: ClusterPartitionMBean.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClusterPartitionMBean.java        2001/11/26 15:52:55     1.4
  +++ ClusterPartitionMBean.java        2001/12/31 20:41:17     1.5
  @@ -18,7 +18,7 @@
    *
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Bill Burke</a>.
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>.
  - *   @version $Revision: 1.4 $
  + *   @version $Revision: 1.5 $
    *
    * <p><b>Revisions:</b><br>
    */
  @@ -51,11 +51,8 @@
      boolean getDeadlockDetection();
      void setDeadlockDetection(boolean doit);
   
  -   Collection getSynchronizedMBeans();
  -   void setSynchronizedMBeans(Collection syncMBeans);
  -   
      // Access to the underlying HAPartition without going through JNDI
      //  
      HAPartition getHAPartition ();
   
  -}
  \ No newline at end of file
  +}
  
  
  
  1.10      +9 -61     
jbossmx/src/main/org/jboss/ha/framework/server/ClusterPartition.java
  
  Index: ClusterPartition.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/ClusterPartition.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ClusterPartition.java     2001/12/29 16:20:12     1.9
  +++ ClusterPartition.java     2001/12/31 20:41:17     1.10
  @@ -23,7 +23,7 @@
    *
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Bill Burke</a>.
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>.
  - *   @version $Revision: 1.9 $
  + *   @version $Revision: 1.10 $
    *
    * <p><b>Revisions:</b><br>
    */
  @@ -36,7 +36,6 @@
      
      // Attributes ----------------------------------------------------
      
  -   protected final Collection syncMBeans = new java.util.ArrayList();
      protected String partitionName = 
org.jboss.metadata.ClusterConfigMetaData.DEFAULT_PARTITION;
      protected String jgProps = 
          "UDP:" +
  @@ -103,32 +102,16 @@
         return this.partition;      
      }
         
  -   public synchronized void setSynchronizedMBeans(Collection syncMBeans)
  -   {
  -      log.info("SynchronizedMBeans set to " + syncMBeans);
  -      synchronized (this.syncMBeans)
  -      {
  -         this.syncMBeans.clear();
  -         this.syncMBeans.addAll(syncMBeans);
  -      }
  -   }
  -
  -   public Collection getSynchronizedMBeans()
  -   {
  -      synchronized (syncMBeans)
  -      {
  -         return new java.util.ArrayList(syncMBeans);
  -      }
  -   }
  -
      // ServiceMBeanSupport overrides 
---------------------------------------------------
      
      public String getName()
      {
         return partitionName;
      }
  +
   
  -   public void startService() throws Exception
  +   public void createService()
  +      throws Exception
      {
         log.info ("Creating JavaGroups JChannel");
         this.channel = new JavaGroups.JChannel(jgProps);
  @@ -143,21 +126,11 @@
         log.info("...Initing HAPartition...");
         partition.init();
         log.info("...HAPartition initialized.");
  -      
  -      synchronized (syncMBeans) //noone should be modifying this ever after it is 
set originally
  -      {
  -         for (Iterator i = syncMBeans.iterator(); i.hasNext(); ) 
  -         {
  -            ObjectName mbean = (ObjectName)i.next();
  -            log.info("registering " + mbean);
  -            getServer().invoke(mbean, 
  -                             "partitionInitializationPhase",
  -                             new Object[] {partition},
  -                             new String[] 
{"org.jboss.ha.framework.interfaces.HAPartition"});
  -            log.info("registered " + mbean);
  -         } // end of for ()
  -      }
  +   }
   
  +   public void startService() 
  +      throws Exception
  +   {
         log.info("Starting ClusterPartition: " + partitionName);
         
         log.info(" Connecting to channel");
  @@ -166,39 +139,14 @@
         log.info(" Starting channel");
         partition.start();
         
  -      synchronized (syncMBeans) //noone should be modifying this ever after it is 
set originally
  -      {
  -         for (Iterator i = syncMBeans.iterator(); i.hasNext(); ) 
  -         {
  -            ObjectName mbean = (ObjectName)i.next();
  -            log.info("registering " + mbean);
  -            getServer().invoke(mbean, 
  -                             "startPartitionService",
  -                             new Object[] {partition},
  -                             new String[] 
{"org.jboss.ha.framework.interfaces.HAPartition"});
  -            log.info("registered " + mbean);
  -         } // end of for ()
  -      }
         log.info("Started ClusterPartition: " + partitionName);
      }
      
  -   protected void stopService()
  +   public void stopService()
      {
         try
         {
            log.info("Stopping HAPartition: " + partitionName);
  -         synchronized (syncMBeans) //noone should be modifying this ever after it 
is set originally
  -         {
  -             for (Iterator i = syncMBeans.iterator(); i.hasNext(); ) 
  -             {
  -                 ObjectName mbean = (ObjectName)i.next();
  -                 log.info("stopping " + mbean);
  -                 getServer().invoke(mbean, 
  -                                    "stopPartitionService",
  -                                    null,
  -                                    null);
  -             } // end of for ()
  -         }
            partition.close();
            log.info("Stopped HAPartition: " + partitionName);
         }
  
  
  

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

Reply via email to