Package org.infinispan.persistence.spi

Examples of org.infinispan.persistence.spi.InitializationContext


      builder
            .persistence()
               .addStore(JpaStoreConfigurationBuilder.class)
                  .persistenceUnitName("org.infinispan.persistence.jpa")
                  .entityClass(KeyValueEntity.class);
      InitializationContext context = createContext(builder.build());
      context.getCache().getAdvancedCache().getComponentRegistry().getGlobalComponentRegistry()
            .registerComponent(new EntityManagerFactoryRegistry(), EntityManagerFactoryRegistry.class);
      JpaStore store = new JpaStore();
      store.init(context);
      return store;
   }
View Full Code Here


                  .addStore(JpaStoreConfigurationBuilder.class)
                     .persistenceUnitName(getPersistenceUnitName())
                     .entityClass(KeyValueEntity.class)
                     .storeMetadata(storeMetadata())
                     .create();
      InitializationContext context = createContext(builder.build());
      context.getCache().getAdvancedCache().getComponentRegistry().getGlobalComponentRegistry()
            .registerComponent(new EntityManagerFactoryRegistry(), EntityManagerFactoryRegistry.class);
      JpaStore store = new JpaStore();
      store.init(context);
      return store;
   }
View Full Code Here

         .async()
            .enable()
            .threadPoolSize(10);
      DummyInMemoryStore underlying = new DummyInMemoryStore();
      writer = new AdvancedAsyncCacheWriter(underlying);
      InitializationContext ctx = PersistenceMockUtil.createContext(getClass().getSimpleName(), builder.build(), marshaller);
      writer.init(ctx);
      writer.start();
      loader = new AdvancedAsyncCacheLoader(underlying, writer.getState());
      loader.init(ctx);
      loader.start();
View Full Code Here

               .getDefaultCacheConfiguration(false);
         builder
               .persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class)
                  .storeName(m.getName());
         Configuration configuration = builder.build();
         InitializationContext ctx = PersistenceMockUtil.createContext(getClass().getSimpleName(), configuration, marshaller);
         writer.init(ctx);
         writer.start();
         underlying.init(ctx);
         underlying.start();
View Full Code Here

TOP

Related Classes of org.infinispan.persistence.spi.InitializationContext

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.