Examples of InterceptorChainFactory


Examples of org.infinispan.factories.InterceptorChainFactory

      // get the component registry and then register the searchFactory.
      ComponentRegistry cr = cache.getAdvancedCache().getComponentRegistry();
      cr.registerComponent(searchFactory, SearchFactoryImplementor.class);

      // Get the interceptor chain factory so I can create my interceptor.
      InterceptorChainFactory icf = cr.getComponent(InterceptorChainFactory.class);

      CommandInterceptor inter = icf.createInterceptor(interceptorClass);
      cr.registerComponent(inter, QueryInterceptor.class);

      cache.getAdvancedCache().addInterceptorAfter(inter, LockingInterceptor.class);

   }
View Full Code Here

Examples of org.infinispan.factories.InterceptorChainFactory

      // get the component registry and then register the searchFactory.
      ComponentRegistry cr = cache.getAdvancedCache().getComponentRegistry();
      cr.registerComponent(searchFactory, SearchFactoryImplementor.class);

      // Get the interceptor chain factory so I can create my interceptor.
      InterceptorChainFactory icf = cr.getComponent(InterceptorChainFactory.class);

      CommandInterceptor inter = icf.createInterceptor(interceptorClass);
      cr.registerComponent(inter, QueryInterceptor.class);

      cache.getAdvancedCache().addInterceptorAfter(inter, LockingInterceptor.class);

   }
View Full Code Here

Examples of org.infinispan.factories.InterceptorChainFactory

      // get the component registry and then register the searchFactory.
      ComponentRegistry cr = cache.getAdvancedCache().getComponentRegistry();
      cr.registerComponent(searchFactory, SearchFactoryImplementor.class);

      // Get the interceptor chain factory so I can create my interceptor.
      InterceptorChainFactory icf = cr.getComponent(InterceptorChainFactory.class);

      CommandInterceptor inter = icf.createInterceptor(interceptorClass);
      cr.registerComponent(inter, QueryInterceptor.class);

      cache.getAdvancedCache().addInterceptorAfter(inter, LockingInterceptor.class);

   }
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory


   public void testBareConfig() throws Exception
   {
      cache.setUseInterceptorMbeans(false);
      Interceptor chain = new InterceptorChainFactory().buildInterceptorChain(cache);
      List list = InterceptorChainFactory.asList(chain);
      System.out.println("testBareConfig interceptors are:\n" + list);
      assertNotNull(list);
      assertEquals(4, list.size());
      assertEquals(list.get(0).getClass(), TxInterceptor.class);
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory

   public void testTxConfig() throws Exception
   {
      cache.setUseInterceptorMbeans(false);
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");

      Interceptor chain = new InterceptorChainFactory().buildInterceptorChain(cache);
      List list = InterceptorChainFactory.asList(chain);
      System.out.println("testTxConfig interceptors are:\n" + list);
      assertNotNull(list);
      assertEquals(4, list.size());
      assertEquals(list.get(0).getClass(), TxInterceptor.class);
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory

      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.setCacheLoaderConfiguration(getCacheLoaderConfig(false, false));
      cache.setCacheMode(TreeCache.REPL_ASYNC);
      cache.setFetchInMemoryState(false);
      cache.createService();
      Interceptor chain = new InterceptorChainFactory().buildInterceptorChain(cache);
      List list = InterceptorChainFactory.asList(chain);
      System.out.println("testSharedCacheLoaderConfig interceptors are:\n" + list);
      assertNotNull(list);

      assertEquals(7, list.size());
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory

      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.setCacheLoaderConfiguration(getCacheLoaderConfig(false, true));
      cache.setCacheMode(TreeCache.REPL_ASYNC);
      cache.setFetchInMemoryState(false);
      cache.createService();
      Interceptor chain = new InterceptorChainFactory().buildInterceptorChain(cache);
      List list = InterceptorChainFactory.asList(chain);
      System.out.println("testUnsharedCacheLoaderConfig interceptors are:\n" + list);
      assertNotNull(list);

      assertEquals(7, list.size());
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory

   public void testTxAndRepl() throws Exception
   {
      cache.setUseInterceptorMbeans(false);
      cache.setCacheMode("repl_sync");
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      Interceptor chain = new InterceptorChainFactory().buildInterceptorChain(cache);
      List list = InterceptorChainFactory.asList(chain);
      System.out.println("testTxAndRepl interceptors are:\n" + list);
      assertNotNull(list);

      assertEquals(5, list.size());
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory

   {
      TreeCache cache = new TreeCache();
      cache.setUseInterceptorMbeans(false);
      cache.setNodeLockingOptimistic(true);

      Interceptor next = new InterceptorChainFactory().buildInterceptorChain(cache);

      // test the chain size.
      List chainAsList = InterceptorChainFactory.asList(next);
      Assert.assertEquals(6, chainAsList.size());
View Full Code Here

Examples of org.jboss.cache.factories.InterceptorChainFactory

      TreeCache cache = new TreeCache();
      cache.setUseInterceptorMbeans(false);
      cache.setNodeLockingOptimistic(true);
      cache.setCacheMode("REPL_SYNC");

      Interceptor next = new InterceptorChainFactory().buildInterceptorChain(cache);

      // test the chain size.
      List chainAsList = InterceptorChainFactory.asList(next);
      Assert.assertEquals(7, chainAsList.size());
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.