本文整理匯總了Java中org.jboss.weld.transaction.spi.TransactionServices類的典型用法代碼示例。如果您正苦於以下問題:Java TransactionServices類的具體用法?Java TransactionServices怎麽用?Java TransactionServices使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TransactionServices類屬於org.jboss.weld.transaction.spi包,在下文中一共展示了TransactionServices類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: TestRuntime
import org.jboss.weld.transaction.spi.TransactionServices; //導入依賴的package包/類
private TestRuntime() {
final ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
serviceRegistry.add(TransactionServices.class, new TransactionServicesImpl());
final BeanDeployment beanDeployment = new BeanDeployment(beanArchiveDiscovery, BeanArchive::isFrameworkRelevant);
realm = new DependencyInjectionRealm().init(
serviceRegistry,
SE,
emptySet(),
UNMODIFIED,
asList(beanDeployment)
);
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
releaser.release();
realm.shutdown();
}
});
LOG.trace("Notifying runtime lifecycle listeners about start");
realm.getInstancesOf(RuntimeLifecycleListener.class, releaser).forEach(RuntimeLifecycleListener::onRuntimeStarted);
}
示例2: TestEEfiJtaPlatform
import org.jboss.weld.transaction.spi.TransactionServices; //導入依賴的package包/類
public TestEEfiJtaPlatform(
final TransactionManager transactionManager,
final TransactionServices transactionServices
) {
this.transactionManager = transactionManager;
this.transactionServices = transactionServices;
}
示例3: createSetupResources
import org.jboss.weld.transaction.spi.TransactionServices; //導入依賴的package包/類
private ResourceProvider createSetupResources(
final TransactionServices transactionServices,
final boolean rollbackTransactions
) {
return manualResourceProvider()
.put("testeefi/setup/class", setupClass)
.put("testeefi/setup/beanArchiveDiscovery", runtime.getBeanArchiveDiscorvery())
.put("testeefi/setup/connectionFactoryManager", (ConnectionFactoryManager) this::connectionFactoryManager)
.put("testeefi/setup/dependencyInjection", testSetupDependencyInjection())
.put("testeefi/setup/annotationScanner", (AnnotationScanner) runtime.getBeanArchiveDiscorvery()::getClassesWith)
.put("testeefi/setup/rollbackTransactions", rollbackTransactions)
.put("testeefi/setup/transactionServices", transactionServices)
.build();
}
示例4: createInstanceServiceRegistry
import org.jboss.weld.transaction.spi.TransactionServices; //導入依賴的package包/類
private static ServiceRegistry createInstanceServiceRegistry(
final Collection<ResourceProvider> resourceProviders,
final BeanArchiveDiscovery beanArchiveDiscovery,
final SessionBeanAlternatives alternatives,
final EjbInjectionServicesImpl.EjbLookup ejbLookup,
final EjbInjectionServicesImpl.EjbFactory ejbFactory,
final PersistenceUnitPropertyContributor propertyContributor
) {
final ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
// Resource injection
serviceRegistry.add(
ResourceInjectionServices.class,
new ResourceInjectionServicesImpl(resourceProviders)
);
// JPA injection
JpaInjectionServicesImpl jpaInjectionService = createJpaInjectionService(
beanArchiveDiscovery,
serviceRegistry.get(ResourceInjectionServices.class),
propertyContributor
);
serviceRegistry.add(JpaInjectionServices.class, jpaInjectionService);
serviceRegistry.add(JpaInjectionServicesImpl.class, jpaInjectionService);
serviceRegistry.add(EjbInjectionServices.class, new EjbInjectionServicesImpl(
ejbLookup,
ejbFactory,
alternatives
));
// Only stubs from here on
serviceRegistry.add(TransactionServices.class, new TransactionServicesImpl());
serviceRegistry.add(SecurityServices.class, new SecurityServicesImpl());
serviceRegistry.add(ProxyServices.class, new ProxyServicesImpl());
serviceRegistry.add(ExecutorServices.class, new ExecutorServicesImpl());
serviceRegistry.add(EjbServices.class, new EjbServicesImpl(ejbFactory));
return serviceRegistry;
}
示例5: serviceRegistry
import org.jboss.weld.transaction.spi.TransactionServices; //導入依賴的package包/類
private static ServiceRegistry serviceRegistry(final Collection<ResourceProvider> resourceProviders) {
final SimpleServiceRegistry services = new SimpleServiceRegistry();
services.add(ResourceInjectionServices.class, new ResourceInjectionServicesImpl(resourceProviders));
services.add(TransactionServices.class, new TransactionServicesImpl());
return services;
}