Package org.jboss.aspects.remoting

Examples of org.jboss.aspects.remoting.ClusteredPojiProxy


                                     new ClusterChooserInterceptor(),
                                     InvokeRemoteInterceptor.singleton
      };
     
      // We can use the same FamilyWrapper as we use for the bean
      ClusteredPojiProxy proxy = new ClusteredPojiProxy(targetId, locator, interceptors, wrapper,
                                                        factoryLBP, partitionName, null);
      Object factoryProxy =  Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, proxy);
      String jndiName = this.getJndiName();
      try
      {
View Full Code Here


      interceptor.setReturnValue(OK);
     
      Object oid = new Object();
      LoadBalancePolicy lbp = new RoundRobin();
      InvokerLocator uri = new InvokerLocator(MOCK_URI);
      ClusteredPojiProxy proxy = new ClusteredPojiProxy(oid, uri, new Interceptor[]{interceptor}, wrapper, lbp, FAMILY_BASE, originTarget);
     
      assertEquals(OK, proxy.invoke(this, Object.class.getDeclaredMethod("toString", new Class[]{}), new Object[]{}));
     
      List<SimpleMetaData> history = interceptor.getInvocationHistory();
      SimpleMetaData metadata = history.get(0);
      assertSame(wrapper, metadata.getMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.CLUSTER_FAMILY_WRAPPER));
      assertSame(lbp, metadata.getMetaData(ClusterConstants.CLUSTERED_REMOTING, ClusterConstants.LOADBALANCE_POLICY));
View Full Code Here

                                     new ClusterChooserInterceptor(),
                                     InvokeRemoteInterceptor.singleton
      };
     
      // We can use the same FamilyWrapper as we use for the bean
      ClusteredPojiProxy proxy = new ClusteredPojiProxy(targetId, locator, interceptors, wrapper,
                                                        factoryLBP, partitionName, null);
      Object factoryProxy =  Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, proxy);
      String jndiName = this.getJndiName();
      try
      {
View Full Code Here

      Class<?>[] interfaces = {this.getProxyFactoryClass()};
      Interceptor[] interceptors = { IsLocalProxyFactoryInterceptor.singleton,
                                     ClusterChooserInterceptor.singleton,
                                     InvokeRemoteInterceptor.singleton };
     
      ClusteredPojiProxy proxy = new ClusteredPojiProxy(proxyFactoryRegistryKey, locator, interceptors, wrapper,
                                                        loadBalancePolicy, partitionName, null);
     
      return  (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, proxy);
   }
View Full Code Here

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

      ClusteredPojiProxy handler = new ClusteredPojiProxy(proxyFactoryKey, locator, interceptors, wrapper,
            loadBalancePolicy, partitionName, null);
      // register the handler

      return (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
   }
View Full Code Here

      Class<?>[] interfaces = this.getAllProxyFactoryInterfaces((Class<ProxyFactory>) proxyFactory.getClass());
      // interceptors to the proxy
      Interceptor[] interceptors =
      {IsLocalProxyFactoryInterceptor.singleton, ClusterChooserInterceptor.singleton, InvokeRemoteInterceptor.singleton};
      // an invocation handler which internally will apply the interceptors and do other magic :)
      ClusteredPojiProxy handler = new ClusteredPojiProxy(proxyFactoryKey, locator, interceptors, wrapper,
            loadBalancePolicyInstance, partitionName, null);

      // finally the proxy for the proxyfactory
      return (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
   }
View Full Code Here

      Class<?>[] interfaces = {this.getProxyFactoryClass()};
      Interceptor[] interceptors = { IsLocalProxyFactoryInterceptor.singleton,
                                     ClusterChooserInterceptor.singleton,
                                     InvokeRemoteInterceptor.singleton };
     
      ClusteredPojiProxy proxy = new ClusteredPojiProxy(proxyFactoryRegistryKey, locator, interceptors, wrapper,
                                                        loadBalancePolicy, partitionName, null);
     
      return  (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, proxy);
   }
View Full Code Here

                                     new ClusterChooserInterceptor(),
                                     InvokeRemoteInterceptor.singleton
      };
     
      // We can use the same FamilyWrapper as we use for the bean
      ClusteredPojiProxy proxy = new ClusteredPojiProxy(targetId, locator, interceptors, wrapper,
                                                        factoryLBP, partitionName, null);
      Object factoryProxy =  Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, proxy);
      try
      {
         Util.rebind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME, factoryProxy);
View Full Code Here

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

      ClusteredPojiProxy handler = new ClusteredPojiProxy(proxyFactoryKey, locator, interceptors, wrapper,
            loadBalancePolicy, partitionName, null);
      // register the handler

      return (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
   }
View Full Code Here

      Class<?>[] interfaces = this.getAllProxyFactoryInterfaces((Class<ProxyFactory>) proxyFactory.getClass());
      // interceptors to the proxy
      Interceptor[] interceptors =
      {IsLocalProxyFactoryInterceptor.singleton, ClusterChooserInterceptor.singleton, InvokeRemoteInterceptor.singleton};
      // an invocation handler which internally will apply the interceptors and do other magic :)
      ClusteredPojiProxy handler = new ClusteredPojiProxy(proxyFactoryKey, locator, interceptors, wrapper,
            loadBalancePolicyInstance, partitionName, null);

      // finally the proxy for the proxyfactory
      return (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
   }
View Full Code Here

TOP

Related Classes of org.jboss.aspects.remoting.ClusteredPojiProxy

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.