Examples of ClusterConfigMetaData


Examples of org.jboss.metadata.ClusterConfigMetaData

   public void create() throws Exception
   {
      super.create ();

      // Get a reference to the DS service
      ClusterConfigMetaData config = getContainer().getBeanMetaData().getClusterConfigMetaData();
      String partitionName = config.getPartitionName();
      String name = "jboss:service=DistributedState,partitionName=" + partitionName;
      ds = (DistributedState) Registry.lookup (name);
      if( ds == null )
         throw new DeploymentException("Failed to find DistributedState service: "+name);
   }
View Full Code Here

Examples of org.jboss.metadata.ClusterConfigMetaData

      // Initialize the dataStore

      // Find HASessionState that we will use
      //
      String sessionStateName = org.jboss.metadata.ClusterConfigMetaData.DEFAULT_SESSION_STATE_NAME;
      ClusterConfigMetaData config = con.getBeanMetaData ().getClusterConfigMetaData ();
      if (config != null)
         sessionStateName = config.getHaSessionStateName ();

      Context ctx = new InitialContext ();
      try {
         this.sessionState = (HASessionState)ctx.lookup (sessionStateName);
      }
View Full Code Here

Examples of org.jboss.metadata.ClusterConfigMetaData

    * create the service, do expensive operations etc
    */
   public void create () throws Exception
   {
      BeanMetaData bmd = con.getBeanMetaData();
      ClusterConfigMetaData ccmd = bmd.getClusterConfigMetaData ();
      String partitionName = ccmd.getPartitionName();
      String name = "jboss:service=DistributedState,partitionName="+partitionName;
      ds = (DistributedState)org.jboss.system.Registry.lookup (name);

      String ejbName = bmd.getEjbName();
      this.DS_CATEGORY = "CMPClusteredInMemoryPersistenceManager-" + ejbName;
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

            container.getAnnotations().disableAnnotation(Clustered.class.getName());
         return;
      }
      */

      ClusterConfigMetaData config = enterpriseBean.getClusterConfig();
      if (config != null)
      {
         ClusteredImpl clusteredAnnotation = new ClusteredImpl();
        
         if (config.getBeanLoadBalancePolicy() != null)
         {
            String policy = config.getBeanLoadBalancePolicy();
            clusteredAnnotation.setLoadBalancePolicy(policy);
         }
        
         if (config.getHomeLoadBalancePolicy() != null)
         {
            String policy = config.getHomeLoadBalancePolicy();
            clusteredAnnotation.setHomeLoadBalancePolicy(policy);
         }

         if (config.getPartitionName() != null)
         {
            clusteredAnnotation.setPartition(config.getPartitionName());
         }
        
         addClassAnnotation(container, Clustered.class, clusteredAnnotation);
      }
   }
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

            container.getAnnotations().disableAnnotation(Clustered.class.getName());
         return;
      }
      */

      ClusterConfigMetaData config = enterpriseBean.getClusterConfig();
      if (config != null)
      {
         ClusteredImpl clusteredAnnotation = new ClusteredImpl();
        
         if (config.getBeanLoadBalancePolicy() != null)
         {
            String policy = config.getBeanLoadBalancePolicy();
            clusteredAnnotation.setLoadBalancePolicy(policy);
         }
        
         if (config.getHomeLoadBalancePolicy() != null)
         {
            String policy = config.getHomeLoadBalancePolicy();
            clusteredAnnotation.setHomeLoadBalancePolicy(policy);
         }

         if (config.getPartitionName() != null)
         {
            clusteredAnnotation.setPartition(config.getPartitionName());
         }
        
         addClassAnnotation(container, Clustered.class, clusteredAnnotation);
      }
   }
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

            container.getAnnotations().disableAnnotation(Clustered.class.getName());
         return;
      }
      */

      ClusterConfigMetaData config = enterpriseBean.getClusterConfig();
      if (config != null)
      {
         ClusteredImpl clusteredAnnotation = new ClusteredImpl();
        
         if (config.getBeanLoadBalancePolicy() != null)
         {
            String policy = config.getBeanLoadBalancePolicy();
            clusteredAnnotation.setLoadBalancePolicy(policy);
         }
        
         if (config.getHomeLoadBalancePolicy() != null)
         {
            String policy = config.getHomeLoadBalancePolicy();
            clusteredAnnotation.setHomeLoadBalancePolicy(policy);
         }

         if (config.getPartitionName() != null)
         {
            clusteredAnnotation.setPartition(config.getPartitionName());
         }
        
         addClassAnnotation(container, Clustered.class, clusteredAnnotation);
      }
   }
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

   {
      Clustered annotation = finder.getAnnotation(type, Clustered.class);
      if(annotation == null)
         return;
     
      ClusterConfigMetaData clustered = new ClusterConfigMetaData();
     
      clustered.setBeanLoadBalancePolicy(annotation.loadBalancePolicy());
      clustered.setHomeLoadBalancePolicy(annotation.homeLoadBalancePolicy());
      clustered.setPartitionName(annotation.partition());
      clustered.setDescriptions(ProcessorUtils.getDescription(" @Clustered for bean: " + type));
     
      metaData.setClusterConfig(clustered);
      metaData.setClustered(true);
   }
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

         JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData) ejb;

         // Create a default cluster configuration
         if (smd.isClustered() && smd.getClusterConfig() == null)
         {
            ClusterConfigMetaData clusterConfig = new ClusterConfigMetaData();

            clusterConfig.setBeanLoadBalancePolicy(ClusteredDefaults.LOAD_BALANCE_POLICY_DEFAULT);
            clusterConfig.setHomeLoadBalancePolicy(ClusteredDefaults.LOAD_BALANCE_POLICY_DEFAULT);
            clusterConfig.setPartitionName(ClusteredDefaults.PARTITION_NAME_DEFAULT);
            clusterConfig.setDescriptions(ProcessorUtils.getDescription("cluster-config for: " + smd.getEjbClass()));

            smd.setClusterConfig(clusterConfig);
         }
      }
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

   public String getProxyFactoryRegistryKey(String jndiName, JBossSessionBeanMetaData smd, boolean isLocal)
   {
      String key = super.getProxyFactoryRegistryKey(jndiName, smd, isLocal);
      if (!isLocal)
      {
         ClusterConfigMetaData ccmd = smd.getClusterConfig();
         assert ccmd != null : ClusterConfigMetaData.class.getSimpleName()
               + " not found in metadata, specified only in XML? [EJBTHREE-1539]";
         key += "/" + ProxyClusteringRegistry.getPartitionName(smd.getClusterConfig());
      }
      return key;
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.ClusterConfigMetaData

            container.getAnnotations().disableAnnotation(Clustered.class.getName());
         return;
      }
      */

      ClusterConfigMetaData config = enterpriseBean.getClusterConfig();
      if (config != null)
      {
         ClusteredImpl clusteredAnnotation = new ClusteredImpl();
        
         if (config.getBeanLoadBalancePolicy() != null)
         {
            String policy = config.getBeanLoadBalancePolicy();
            clusteredAnnotation.setLoadBalancePolicy(policy);
         }
        
         if (config.getHomeLoadBalancePolicy() != null)
         {
            String policy = config.getHomeLoadBalancePolicy();
            clusteredAnnotation.setHomeLoadBalancePolicy(policy);
         }

         if (config.getPartitionName() != null)
         {
            clusteredAnnotation.setPartition(config.getPartitionName());
         }
        
         addClassAnnotation(container, Clustered.class, clusteredAnnotation);
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.