Examples of HAPartition


Examples of org.jboss.ha.framework.interfaces.HAPartition

   {
      try
      {
         InitialContext ctx = new InitialContext();
         String jndiName = "/HAPartition/" + this.partitionName;
         HAPartition partition = (HAPartition) ctx.lookup(jndiName);
         return partition.getCurrentView();
      }
      catch (Exception e)
      {
         this.log.error("Failed to access HAPartition state", e);
         return null;
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

      {
         map = new HashMap<Server, TimestampDiscrepancy>(discrepancies);
      }
     
      final RemoteDiscrepancies arg = new RemoteDiscrepancies(partition.getClusterNode(), map);
      final HAPartition haPartition = this.partition;
      Runnable r = new Runnable()
      {
         public void run()
         {
            try
            {
               haPartition.callMethodOnCluster(getServiceHAName(),
                                               "pushDiscrepancyMap",
                                               new Object[] { arg },
                                               PUSH_DISCREPANCY_MAP_TYPES, true);
            }
            catch (Exception e)
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

   }

   public void start() throws Exception
   {
      // Lookup the parition
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);
      drm = partition.getDistributedReplicantManager();
      log.debug("Obtained DistributedReplicantManager from partition="+partitionName);
      drm.registerListener(category, this);
      // Bind the jboss.bind.address value into the DRM
      String address = System.getProperty("jboss.bind.address");
      drm.add(category, address);
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

   }

   public void start() throws Exception
   {
      // Lookup the partition
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);
      this.entryMap = partition.getDistributedStateService();
      log.debug("Obtained DistributedState from partition="+partitionName);
      entryMap.registerDSListenerEx(category, this);
   }
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

      InitialContext ctx = new InitialContext(env);
      String partitionName = env.getProperty(NamingContext.JNP_PARTITION_NAME);
      if( partitionName != null )
      {
         String partitionJndiName = "/HAPartition/" + partitionName;
         HAPartition partition = (HAPartition) ctx.lookup(partitionJndiName);
         Vector view = partition.getCurrentView();
         log.debug("Found HAPartition: "+partitionName);
         hosts = new String[view.size()];
         for(int v = 0; v < view.size(); v ++)
         {
            Object addr = view.get(v);
            log.debug(addr);
            hosts[v] = addr.toString();
         }
      }
      else
      {
         NamingEnumeration iter = ctx.list("/HAPartition");
         while( iter.hasMore() )
         {
            NameClassPair pair = (NameClassPair) iter.next();
            partitionName = pair.getName();
            String partitionJndiName = "/HAPartition/" + partitionName;
            HAPartition partition = (HAPartition) ctx.lookup(partitionJndiName);
            env.setProperty(NamingContext.JNP_PARTITION_NAME, partitionName);
            Vector view = partition.getCurrentView();
            log.debug("Found HAPartition: "+partitionName);
            hosts = new String[view.size()];
            for(int v = 0; v < view.size(); v ++)
            {
               Object addr = view.get(v);
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

    * @return an invoker proxy
    * @throws Exception
    */
   protected Invoker createInvoker() throws Exception
   {
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);

      /* Create a HATarget for the local invoker mbean stub. The name passed
      to the HATarget must be the wrappedJmxInvokerName so that different
      more than one HttpProxyFactoryHA may be configured for the same
      realJmxInvokerName.
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

   }
  
   protected void setupInvokers() throws Exception
   {
      String partitionName = container.getBeanMetaData().getClusterConfigMetaData().getPartitionName();
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);
      this.drm = partition.getDistributedReplicantManager ();
     
      replicantName = jmxName.toString ();
     
      ObjectName oname = new ObjectName(invokerMetaData.getInvokerMBean());
      jrmp = (InvokerHA)Registry.lookup(oname);
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

   public static ClassProxy clusterObject(Object objectId, Object obj, String partitionName, LoadBalancePolicy lb, InvokerLocator locator)
   throws Exception
   {
      String proxyFamilyName = objectId.toString() + locator.getProtocol() + partitionName;
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);

      HATarget target = null;
      Map families = null;
      InstanceAdvisor advisor = null;
      Class clazz;
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
      locator = new InvokerLocator(clientBindUrl);
      StatelessContainer container = (StatelessContainer) getContainer();
      String partitionName = container.getPartitionName();
      proxyFamilyName = container.getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, container.getInitialContextProperties());
      drm = partition.getDistributedReplicantManager();
      hatarget = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
      ClusteringTargetsRepository.initTarget(proxyFamilyName, hatarget.getReplicants());
     
      container.getClusterFamilies().put(proxyFamilyName, hatarget);
     
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition

   }

   public void start() throws Exception
   {
      // Lookup the partition
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);
      this.entryMap = partition.getDistributedStateService();
      log.debug("Obtained DistributedState from partition="+partitionName);
      entryMap.registerDSListenerEx(category, this);
   }
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.