Package org.jboss.ejb3.proxy.clustered.registry

Examples of org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo


      if(result instanceof JBossGenericBeanMetaData)
      {
         log.warn("FIXME: EJBTHREE-1227: JBossGenericBeanMetaData found for '" + ejbName + "' instead of " + enterpriseBeanMetaDataClass);
         if(enterpriseBeanMetaDataClass.equals(JBossSessionBeanMetaData.class))
         {
            result = new JBossSessionGenericWrapper((JBossGenericBeanMetaData) result);
         }
         else if(enterpriseBeanMetaDataClass.equals(JBossMessageDrivenBeanMetaData.class))
         {
            result = new JBossMessageDrivenBeanGenericWrapper((JBossGenericBeanMetaData) result);
         }
View Full Code Here


    * </p>
    *
    */
   protected void initMetaDataBasedAnnotationRepository()
   {
      this.metadataBasedAnnotationRepo = new AnnotationRepositoryToMetaData(this.beanClass, this.xml, name, this.classloader);
      List<MetaDataBridge<InterceptorMetaData>> interceptorBridges = new ArrayList<MetaDataBridge<InterceptorMetaData>>();
      interceptorBridges.add(new InterceptorMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new AdditiveBeanInterceptorMetaDataBridge(this.beanClass, this.classloader, this.xml));
     
View Full Code Here

         registeredPoolName = PoolDefaults.POOL_IMPLEMENTATION_THREADLOCAL;
      }
      int maxSize = poolAnnotation.maxSize();
      long timeout = poolAnnotation.timeout();
      PoolFactoryRegistry registry = deployment.getPoolFactoryRegistry();
      PoolFactory factory = registry.getPoolFactory(registeredPoolName);
      pool = factory.createPool();
      pool.initialize(this, maxSize, timeout);

      resolveInjectors();
      pool.setInjectors(injectors.toArray(new Injector[injectors.size()]));
   }
View Full Code Here

         // Default the Pool Implementation
         registeredPoolName = PoolDefaults.POOL_IMPLEMENTATION_THREADLOCAL;
      }
      int maxSize = poolAnnotation.maxSize();
      long timeout = poolAnnotation.timeout();
      PoolFactoryRegistry registry = deployment.getPoolFactoryRegistry();
      PoolFactory factory = registry.getPoolFactory(registeredPoolName);
      pool = factory.createPool();
      pool.initialize(this, maxSize, timeout);

      resolveInjectors();
      pool.setInjectors(injectors.toArray(new Injector[injectors.size()]));
View Full Code Here

         throw new RuntimeException("Unable to create a remoting proxy for ProxyFactory " + proxyFactoryKey
               + " with remoting url " + remotingUrl, mue);

      }

      ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);

      if (bci == null)
      {
         throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName()
               + " for proxyFactoryKey " + proxyFactoryKey);
      }

      String partitionName = bci.getPartitionName();

      assert partitionName != null && !partitionName.trim().equals("") : " Partition name is required, but is not available in ProxyClusteringInfo";

      String lbpClass = bci.getHomeLoadBalancePolicy().getName();

      assert lbpClass != null && !lbpClass.trim().equals("") : LoadBalancePolicy.class.getSimpleName()
            + " class name is required, but is not available in ProxyClusteringInfo";

      LoadBalancePolicy loadBalancePolicy;
      try
      {
         log.debug("Instantiating loadbalancer policy " + lbpClass + " for remote proxyfactory bound at key "
               + proxyFactoryKey);
         loadBalancePolicy = (LoadBalancePolicy) cl.loadClass(lbpClass).newInstance();
      }
      catch (Exception e)
      {
         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());
View Full Code Here

    */
   private void decorateReferenceForClustering(Reference ref)
   {
      String proxyFactoryKey = getSingleRequiredRefAddr(ref,
            ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY);
      ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);

      if (bci == null)
      {
         throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName()
               + " for proxyFactoryKey " + proxyFactoryKey);
      }

      RefAddr partitionRef = new StringRefAddr(
            ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_PARTITION_NAME, bci.getPartitionName());
      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

    * @param ref           the reference
    */
   private void decorateReferenceForClustering(Reference ref)
   {
      String proxyFactoryKey = getSingleRequiredRefAddr(ref, ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY);
      ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);
     
      if (bci == null)
      {
         throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName() +
                                         " for proxyFactoryKey " + proxyFactoryKey);
      }
     
      RefAddr partitionRef = new StringRefAddr(ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_PARTITION_NAME, bci.getPartitionName());
      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

         throw new RuntimeException("Unable to create a remoting proxy for ProxyFactory " + proxyFactoryKey
               + " with remoting url " + remotingUrl, mue);

      }

      ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);

      if (bci == null)
      {
         throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName()
               + " for proxyFactoryKey " + proxyFactoryKey);
      }

      String partitionName = bci.getPartitionName();

      assert partitionName != null && !partitionName.trim().equals("") : " Partition name is required, but is not available in ProxyClusteringInfo";

      String lbpClass = bci.getHomeLoadBalancePolicy().getName();

      assert lbpClass != null && !lbpClass.trim().equals("") : LoadBalancePolicy.class.getSimpleName()
            + " class name is required, but is not available in ProxyClusteringInfo";

      LoadBalancePolicy loadBalancePolicy;
      try
      {
         log.debug("Instantiating loadbalancer policy " + lbpClass + " for remote proxyfactory bound at key "
               + proxyFactoryKey);
         loadBalancePolicy = (LoadBalancePolicy) cl.loadClass(lbpClass).newInstance();
      }
      catch (Exception e)
      {
         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());
View Full Code Here

    */
   private void decorateReferenceForClustering(Reference ref)
   {
      String proxyFactoryKey = getSingleRequiredRefAddr(ref,
            ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY);
      ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);

      if (bci == null)
      {
         throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName()
               + " for proxyFactoryKey " + proxyFactoryKey);
      }

      RefAddr partitionRef = new StringRefAddr(
            ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_PARTITION_NAME, bci.getPartitionName());
      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

    * @param ref           the reference
    */
   private void decorateReferenceForClustering(Reference ref)
   {
      String proxyFactoryKey = getSingleRequiredRefAddr(ref, ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY);
      ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);
     
      if (bci == null)
      {
         throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName() +
                                         " for proxyFactoryKey " + proxyFactoryKey);
      }
     
      RefAddr partitionRef = new StringRefAddr(ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_PARTITION_NAME, bci.getPartitionName());
      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

TOP

Related Classes of org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo

Copyright © 2018 www.massapicom. 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.