Examples of FamilyWrapper


Examples of org.jboss.aspects.remoting.FamilyWrapper

            + " class name is required, but is not specified; improperly bound reference in JNDI";
     
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      LoadBalancePolicy loadBalancePolicy = (LoadBalancePolicy) tccl.loadClass(lbpClass).newInstance();
     
      FamilyWrapper wrapper = getFamilyWrapper(name, refAddrs);
     
      Class<?>[] interfaces = {this.getProxyFactoryClass()};
      Interceptor[] interceptors = { IsLocalProxyFactoryInterceptor.singleton,
                                     ClusterChooserInterceptor.singleton,
                                     InvokeRemoteInterceptor.singleton };
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

         }
      }
     
      log.debug("Creating " + FamilyWrapper.class.getSimpleName() + " for family " +
                familyName + " using targets " + targets);
      return new FamilyWrapper(familyName, targets);
   }
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

      }
      else
      {
         lbPolicy = clustered.loadBalancePolicy().newInstance();
      }
      wrapper = new FamilyWrapper(proxyFamilyName, hatarget.getReplicants());
     
      this.drm = partition.getDistributedReplicantManager();
      drm.registerListener(proxyFamilyName, this);
     
      super.start();
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

      }
      else
      {
         lbPolicy = clustered.loadBalancePolicy().newInstance();
      }
      wrapper = new FamilyWrapper(proxyFamilyName, hatarget.getReplicants());
     
      this.drm = partition.getDistributedReplicantManager();
      drm.registerListener(proxyFamilyName, this);
     
      super.start();
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

   }
  
   public void testSerialization() throws IOException, ClassNotFoundException
   {
      List targets = Arrays.asList(new String[]{"A", "B"});
      FamilyWrapper wrapper = new FamilyWrapper("testSerialization", targets);
      FamilyClusterInfo fci = wrapper.get();
      assertNotNull(fci);
      assertEquals(targets, fci.getTargets());
     
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(wrapper);
      oos.close();
      byte[] bytes = baos.toByteArray();
     
      List newTargets = Arrays.asList(new String[]{"C", "D"});
     
      FamilyClusterInfo fci2 = ClusteringTargetsRepository.initTarget("testSerialization", newTargets, 1);
     
      assertSame(fci, fci2);
     
      assertEquals(newTargets, fci.getTargets());
     
      ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
      ObjectInputStream ois = new ObjectInputStream(bais);
      FamilyWrapper deserialized = (FamilyWrapper) ois.readObject();
     
      FamilyClusterInfo fci3 = deserialized.get();
     
      assertSame(fci, fci3);
     
      assertEquals(targets, fci3.getTargets());
     
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

         catch (LoadBalancePolicyNotRegisteredException e){}
        
         lbPolicy = (LoadBalancePolicy)Thread.currentThread().getContextClassLoader().loadClass(policyClass)
               .newInstance();
      }
      wrapper = new FamilyWrapper(proxyFamilyName, hatarget.getReplicants());
     
      drm.registerListener(proxyFamilyName, this);
     
      super.start();
     
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

         catch (LoadBalancePolicyNotRegisteredException e){}
        
         lbPolicy = (LoadBalancePolicy)Thread.currentThread().getContextClassLoader().loadClass(policyClass)
               .newInstance();
      }
      wrapper = new FamilyWrapper(proxyFamilyName, hatarget.getReplicants());
     
      drm.registerListener(proxyFamilyName, this);
     
      super.start();
   }
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

      String familyInfoName = getClusterFamilyNamePolicy().getClusterFamilyName(containerName, locator, partitionName);
     
      HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, null);
      HATarget hatarget = new HATarget(partition, familyInfoName, locator, HATarget.ENABLE_INVOCATIONS);
     
      FamilyWrapper wrapper = new FamilyWrapper(familyInfoName, hatarget.getReplicants());
     
      String lbpClassKey = clusterMetadata.getLoadBalancePolicy();
      Class<? extends LoadBalancePolicy> lbPolicyClass = getLoadBalancePolicyClass(lbpClassKey, metadata.isStateful());        
    
      lbpClassKey = clusterMetadata.getHomeLoadBalancePolicy();
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

      {
         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
View Full Code Here

Examples of org.jboss.aspects.remoting.FamilyWrapper

      {
         throw new RuntimeException("Could not create loadbalancer policy instance for " + lbpClass
               + " while creating a proxy to remote proxyfactory", e);
      }
      // family wrapper (which contains the latest information of the cluster topology)
      FamilyWrapper wrapper = clusteringInfo.getFamilyWrapper();
      // the interfaces to be exposed by the proxy for the proxyfactory
      Class<?>[] interfaces = this.getAllProxyFactoryInterfaces((Class<ProxyFactory>) proxyFactory.getClass());
      // interceptors to the proxy
      Interceptor[] interceptors =
      {IsLocalProxyFactoryInterceptor.singleton, ClusterChooserInterceptor.singleton, InvokeRemoteInterceptor.singleton};
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.