Package org.jboss.aop

Examples of org.jboss.aop.InstanceAdvisor.insertInterceptor()


      else
      {
         clazz = obj.getClass();
         ClassProxy proxy = ClassProxyFactory.newInstance(obj.getClass());
         advisor = proxy._getInstanceAdvisor();
         advisor.insertInterceptor(new ForwardingInterceptor(obj));
         Dispatcher.singleton.registerTarget(objectId, proxy);
      }
      families = (Map) advisor.getMetaData().getMetaData(CLUSTERED_REMOTING, CLUSTER_FAMILIES);
      if (families != null)
      {
View Full Code Here


      {
         families = new HashMap();
         target = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
         ClusteringTargetsRepository.initTarget(proxyFamilyName, target.getReplicantList());
         families.put(proxyFamilyName, target);
         advisor.insertInterceptor(0, new ReplicantsManagerInterceptor(families));
      }

      ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
      InstanceAdvisor proxyAdvisor = proxy._getInstanceAdvisor();
      proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
View Full Code Here

         advisor.insertInterceptor(0, new ReplicantsManagerInterceptor(families));
      }

      ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
      InstanceAdvisor proxyAdvisor = proxy._getInstanceAdvisor();
      proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
      advisor.insertInterceptor(SecurityClientInterceptor.singleton);
      advisor.insertInterceptor(ClientTxPropagationInterceptor.singleton);
      proxyAdvisor.insertInterceptor(MergeMetaDataInterceptor.singleton);
      proxyAdvisor.insertInterceptor(ClusterChooserInterceptor.singleton);
      proxyAdvisor.insertInterceptor(InvokeRemoteInterceptor.singleton);
View Full Code Here

      ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
      InstanceAdvisor proxyAdvisor = proxy._getInstanceAdvisor();
      proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
      advisor.insertInterceptor(SecurityClientInterceptor.singleton);
      advisor.insertInterceptor(ClientTxPropagationInterceptor.singleton);
      proxyAdvisor.insertInterceptor(MergeMetaDataInterceptor.singleton);
      proxyAdvisor.insertInterceptor(ClusterChooserInterceptor.singleton);
      proxyAdvisor.insertInterceptor(InvokeRemoteInterceptor.singleton);

      proxyAdvisor.getMetaData().addMetaData(CLUSTERED_REMOTING,
      CLUSTER_FAMILY_WRAPPER,
View Full Code Here

      InstanceAdvisor proxyAdvisor = proxy._getInstanceAdvisor();
      proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
      advisor.insertInterceptor(SecurityClientInterceptor.singleton);
      advisor.insertInterceptor(ClientTxPropagationInterceptor.singleton);
      proxyAdvisor.insertInterceptor(MergeMetaDataInterceptor.singleton);
      proxyAdvisor.insertInterceptor(ClusterChooserInterceptor.singleton);
      proxyAdvisor.insertInterceptor(InvokeRemoteInterceptor.singleton);

      proxyAdvisor.getMetaData().addMetaData(CLUSTERED_REMOTING,
      CLUSTER_FAMILY_WRAPPER,
      new FamilyWrapper(proxyFamilyName, target.getReplicantList()),
View Full Code Here

      proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
      advisor.insertInterceptor(SecurityClientInterceptor.singleton);
      advisor.insertInterceptor(ClientTxPropagationInterceptor.singleton);
      proxyAdvisor.insertInterceptor(MergeMetaDataInterceptor.singleton);
      proxyAdvisor.insertInterceptor(ClusterChooserInterceptor.singleton);
      proxyAdvisor.insertInterceptor(InvokeRemoteInterceptor.singleton);

      proxyAdvisor.getMetaData().addMetaData(CLUSTERED_REMOTING,
      CLUSTER_FAMILY_WRAPPER,
      new FamilyWrapper(proxyFamilyName, target.getReplicantList()),
      PayloadKey.AS_IS);
View Full Code Here

   public static void makeRemotable(InstanceAdvised proxy, InvokerLocator locator,
         Object objectId, List<Interceptor> interceptors, String subsystem)
   {
      InstanceAdvisor advisor = proxy._getInstanceAdvisor();
      for(Interceptor i : interceptors)
         advisor.insertInterceptor(i);
      advisor.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING,
         InvokeRemoteInterceptor.INVOKER_LOCATOR,
         locator,
         PayloadKey.AS_IS);
      advisor.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING,
View Full Code Here

         assertEquals(Interceptions.getMethodName("MyAspect", "POJO", "someMethod"), Interceptions.get(0));

         System.out.println("---- Adding more interceptors");

         InstanceAdvisor pojoIa1 = ((Advised)pojo1)._getInstanceAdvisor();
         pojoIa1.insertInterceptor(new MyInterceptor());

         Interceptions.clear();
         pojo1.someMethod(123);
         assertEquals(2, Interceptions.size());
         assertEquals(Interceptions.getMethodName("MyInterceptor", "POJO", "someMethod"), Interceptions.get(0));
View Full Code Here

         sub1.someMethod(123);
         assertEquals(1, Interceptions.size());
         assertEquals(Interceptions.getMethodName("MyAspect", "POJO", "someMethod"), Interceptions.get(0));

         InstanceAdvisor subPojoIa1 = ((Advised)sub1)._getInstanceAdvisor();
         subPojoIa1.insertInterceptor(new MyInterceptor());
         subPojoIa1.appendInterceptor(new YourInterceptor());

         Interceptions.clear();
         sub1.someMethod(123);
         assertEquals(3, Interceptions.size());
View Full Code Here

      else
      {
         clazz = obj.getClass();
         ClassProxy proxy = ClassProxyFactory.newInstance(obj.getClass());
         advisor = proxy._getInstanceAdvisor();
         advisor.insertInterceptor(new ForwardingInterceptor(obj));
         Dispatcher.singleton.registerTarget(objectId, proxy);
      }
      families = (Map) advisor.getMetaData().getMetaData(CLUSTERED_REMOTING, CLUSTER_FAMILIES);
      if (families != null)
      {
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.