User: patriot1burke
  Date: 02/01/13 18:00:22

  Modified:    src/main/org/jboss/metadata ClusterConfigMetaData.java
                        BeanMetaData.java
  Log:
  improved configuration.  Went back to old way of configuring load-balance policies
  
  Revision  Changes    Path
  1.5       +31 -4     jboss/src/main/org/jboss/metadata/ClusterConfigMetaData.java
  
  Index: ClusterConfigMetaData.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/metadata/ClusterConfigMetaData.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClusterConfigMetaData.java        2001/11/26 03:17:47     1.4
  +++ ClusterConfigMetaData.java        2002/01/14 02:00:22     1.5
  @@ -16,7 +16,7 @@
    * expanded to include other cluster configuration parameters later on.
   
    * @author <a href="mailto:[EMAIL PROTECTED]";>Bill Burke</a>.
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public class ClusterConfigMetaData extends MetaData
   {
  @@ -51,12 +51,39 @@
      {
         return this.haSessionStateName;
      }
  -   
  +
  +   public void init(BeanMetaData data)
  +   {
  +      homeLoadBalancePolicy = "org.jboss.ha.framework.interfaces.RoundRobin";
  +      if (beanLoadBalancePolicy == null)
  +      {
  +      if (data.isSession())
  +      {
  +         if (((SessionMetaData)data).isStateful())
  +         {
  +            beanLoadBalancePolicy = 
"org.jboss.ha.framework.interfaces.FirstAvailable";
  +         }
  +         else
  +         {
  +            beanLoadBalancePolicy = "org.jboss.ha.framework.interfaces.RoundRobin";
  +         }
  +      }
  +      else if (data.isEntity())
  +      {
  +         beanLoadBalancePolicy = "org.jboss.ha.framework.interfaces.FirstAvailable";
  +      }
  +      else
  +      {
  +         beanLoadBalancePolicy = "org.jboss.ha.framework.interfaces.FirstAvailable";
  +      }
  +      }
  +   }
      public void importJbossXml(Element element) throws DeploymentException 
      {
         partitionName = getElementContent(getOptionalChild(element, 
"partition-name"), DEFAULT_PARTITION);
  -      homeLoadBalancePolicy = getElementContent(getOptionalChild(element, 
"home-load-balance-policy"), null);
  -      beanLoadBalancePolicy = getElementContent(getOptionalChild(element, 
"bean-load-balance-policy"), null);
  +      homeLoadBalancePolicy = getElementContent(getOptionalChild(element, 
"home-load-balance-policy"), homeLoadBalancePolicy);
  +      beanLoadBalancePolicy = getElementContent(getOptionalChild(element, 
"bean-load-balance-policy"), beanLoadBalancePolicy);
  +
   
         // SFSB settings only
         //
  
  
  
  1.36      +7 -34     jboss/src/main/org/jboss/metadata/BeanMetaData.java
  
  Index: BeanMetaData.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/BeanMetaData.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- BeanMetaData.java 2002/01/12 16:57:16     1.35
  +++ BeanMetaData.java 2002/01/14 02:00:22     1.36
  @@ -31,7 +31,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
    * @author <a href="mailto:[EMAIL PROTECTED]";>Ole Husgaard</a> 
    * @author <a href="mailto:[EMAIL PROTECTED]";>Bill Burke</a> 
  - * @version $Revision: 1.35 $
  + * @version $Revision: 1.36 $
    *
    *  <p><b>Revisions:</b><br>
    *  <p><b>2001/10/16: billb</b>
  @@ -109,11 +109,8 @@
      private String beanInvoker = null;
      public static final String DEFAULT_HOME_INVOKER = 
"jboss:service=invoker,type=jrmp";
      public static final String DEFAULT_BEAN_INVOKER = 
"jboss:service=invoker,type=jrmp";
  -   public static final String DEFAULT_CLUSTERED_HOME_INVOKER = 
"jboss:service=invoker,type=jrmpha,partition=DefaultPartition,load-balance=RoundRobin";
  -   public static final String DEFAULT_CLUSTERED_SLSB_INVOKER = 
"jboss:service=invoker,type=jrmpha,partition=DefaultPartition,load-balance=RoundRobin";
  -   public static final String DEFAULT_CLUSTERED_SFSB_INVOKER = 
"jboss:service=invoker,type=jrmpha,partition=DefaultPartition,load-balance=FirstAvailable";
  -   public static final String DEFAULT_CLUSTERED_EB_INVOKER = 
"jboss:service=invoker,type=jrmpha,partition=DefaultPartition,load-balance=FirstAvailable";
  -   public static final String DEFAULT_CLUSTERED_BEAN_INVOKER = 
"jboss:service=invoker,type=jrmpha,partition=DefaultPartition,load-balance=FirstAvailable";
  +   public static final String DEFAULT_CLUSTERED_HOME_INVOKER = 
"jboss:service=invoker,type=jrmpha";
  +   public static final String DEFAULT_CLUSTERED_BEAN_INVOKER = 
"jboss:service=invoker,type=jrmpha";
      /** The cluster-config element info */
      private ClusterConfigMetaData clusterConfig = null;
   
  @@ -520,10 +517,11 @@
   
   
         Element clusterConfigElement = getOptionalChild(element, "cluster-config");
  +      this.clusterConfig = new ClusterConfigMetaData();
  +      clusterConfig.init(this);
         if (clusterConfigElement != null)
         {
  -         this.clusterConfig = new ClusterConfigMetaData();
  -         clusterConfig.importJbossXml(clusterConfigElement);
  +      clusterConfig.importJbossXml(clusterConfigElement);
         }
   
         // Setup default invokers for this bean
  @@ -546,32 +544,7 @@
         }
         else // Setup default clustered bean invoker
         {
  -         if (isEntity())
  -         {
  -            beanInvoker = DEFAULT_CLUSTERED_EB_INVOKER;
  -         }
  -         else if (isSession())
  -         {
  -            if (this instanceof SessionMetaData)
  -            {
  -               if (((SessionMetaData)this).isStateful())
  -               {
  -                  beanInvoker = DEFAULT_CLUSTERED_SFSB_INVOKER;
  -               }
  -               else
  -               {
  -                  beanInvoker = DEFAULT_CLUSTERED_SLSB_INVOKER;
  -               }
  -            }
  -            else
  -            {
  -               beanInvoker = DEFAULT_CLUSTERED_BEAN_INVOKER;
  -            }
  -         }
  -         else
  -         {
  -            beanInvoker = DEFAULT_CLUSTERED_BEAN_INVOKER;
  -         }
  +         beanInvoker = DEFAULT_CLUSTERED_BEAN_INVOKER;
         }
         }
      }
  
  
  

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

Reply via email to