Examples of FamilyClusterInfo


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

         {
            proxyFamilyName = getProxyFamilyName(mi);
         }
        
         // Clear the targets to simulate exhausting them all
         FamilyClusterInfo info = ClusteringTargetsRepository.getFamilyClusterInfo(proxyFamilyName);
         for (Object target: info.getTargets())
            info.removeDeadTarget(target);
        
         throw new ServiceUnavailableException("Service unavailable",
                                               new Exception("Test"));
      }
View Full Code Here

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

   }
  
   private void confirmTargetCount(int expectedCount, boolean logIt)
   {
      String familyName = getFamilyName();
      FamilyClusterInfo info = ClusteringTargetsRepository.getFamilyClusterInfo(familyName);
      assertNotNull("FamilyClusterInfo exists for " + familyName, info);
      List<?> targets = info.getTargets();
      assertEquals("FamilyClusterInfo for " + familyName + " has correct target count " + targets,
                   expectedCount, targets.size());
      if (logIt)
      {
         this.log.info("Targets are " + targets);
View Full Code Here

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

      getLog().debug("ok");
   }
  
   private void confirmTargetCount(String familyName, int expectedCount)
   {
      FamilyClusterInfo info = ClusteringTargetsRepository.getFamilyClusterInfo(familyName);
      assertNotNull("FamilyClusterInfo exists for " + familyName, info);
      assertEquals("FamilyClusterInfo for " + familyName + " has correct target count",
                   expectedCount, info.getTargets().size());
   }
View Full Code Here

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

         return;
      }

      Context context = bindings.getContext();

      FamilyClusterInfo fci = beanClusteringInfo.getFamilyWrapper().get();
      String familyName = fci.getFamilyName();
      log.debug("Cluster topology changed for family " + familyName + " new view id " + fci.getCurrentViewId()
            + " - Updating JNDI bindings for container " + beanClusteringInfo.getContainerName());

      for (JndiReferenceBinding binding : bindings.getDefaultRemoteBindings())
      {
         RefAddr refAddr = getFirstRefAddr(binding.getReference(),
View Full Code Here

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

         throw new RuntimeException("Could not load loadbalancer policy " + lbpClass
               + " while creating a proxy to remote proxyfactory", e);
      }

      FamilyWrapper wrapper = bci.getFamilyWrapper();
      FamilyClusterInfo familyClusterInfo = wrapper.get();
      log.debug("Remote proxyfactory for key " + proxyFactoryKey + " will be associated with family name "
            + familyClusterInfo.getFamilyName() + " view id " + familyClusterInfo.getCurrentViewId()
            + " with available targets " + familyClusterInfo.getTargets());

      Class<ProxyFactory>[] interfaces = this.getAllProxyFactoryInterfaces((Class<ProxyFactory>) proxyFactory
            .getClass());
      Interceptor[] interceptors =
      {IsLocalProxyFactoryInterceptor.singleton, ClusterChooserInterceptor.singleton, InvokeRemoteInterceptor.singleton};
View Full Code Here

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

      addRefAddrToReference(ref, partitionRef);
      RefAddr lbpRef = new StringRefAddr(
            ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_PROXY_FACTORY_LOAD_BALANCE_POLICY, bci
                  .getHomeLoadBalancePolicy().getName());
      addRefAddrToReference(ref, lbpRef);
      FamilyClusterInfo fci = bci.getFamilyWrapper().get();
      RefAddr familyNameRef = new StringRefAddr(
            ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_FAMILY_NAME, fci.getFamilyName());
      addRefAddrToReference(ref, familyNameRef);

      decorateReferenceForClusteringTargets(ref, fci);
   }
View Full Code Here

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

  
   public static void selectProvidedTargetTest(AopLoadBalancePolicy lbp)
   {
      testCount++;
      List<String> targets = Arrays.asList(TARGETS);
      FamilyClusterInfo fci = ClusteringTargetsRepository.initTarget(FAMILY_BASE + testCount, targets);
     
      Object target = targets.get(1);
      MockInvocation invocation = new MockInvocation(new Interceptor[0]);
      invocation.getMetaData().addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.HA_TARGET, target, PayloadKey.TRANSIENT);
      assertSame(target, lbp.chooseTarget(fci, invocation));
View Full Code Here

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

  
   public static void invalidProvidedTargetTest(AopLoadBalancePolicy lbp)
   {
      testCount++;
      List<String> targets = Arrays.asList(TARGETS);
      FamilyClusterInfo fci = ClusteringTargetsRepository.initTarget(FAMILY_BASE + testCount, targets);
     
      Object target = new Object();
      MockInvocation invocation = new MockInvocation(new Interceptor[0]);
      invocation.getMetaData().addMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.HA_TARGET, target, PayloadKey.TRANSIENT);
     
View Full Code Here

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

  
   public static void stickinessTrumpsProvidedTargetTest(AopLoadBalancePolicy lbp)
   {
      testCount++;
      List<String> targets = Arrays.asList(TARGETS);
      FamilyClusterInfo fci = ClusteringTargetsRepository.initTarget(FAMILY_BASE + testCount, targets);
     
      Object selected = lbp.chooseTarget(fci);
      Object different = null;
      for (Object target : targets)
      {
View Full Code Here

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

   }
  
   public void testSynchronization() throws Exception
   {
      ClusteringTargetsRepository.initTarget("testSynchronization", new ArrayList(), 0);
      FamilyClusterInfo fci = ClusteringTargetsRepository.getFamilyClusterInfo("testSynchronization");
     
      Updater updater = new Updater(fci);
      Remover remover = new Remover(fci);
      Resetter resetter = new Resetter(fci);
     
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.