當前位置: 首頁>>代碼示例>>Java>>正文


Java TransactionServices類代碼示例

本文整理匯總了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);
}
 
開發者ID:dajudge,項目名稱:testee.fi,代碼行數:22,代碼來源:TestRuntime.java

示例2: TestEEfiJtaPlatform

import org.jboss.weld.transaction.spi.TransactionServices; //導入依賴的package包/類
public TestEEfiJtaPlatform(
        final TransactionManager transactionManager,
        final TransactionServices transactionServices
) {
    this.transactionManager = transactionManager;
    this.transactionServices = transactionServices;
}
 
開發者ID:dajudge,項目名稱:testee.fi,代碼行數:8,代碼來源:TestEEfiJtaPlatform.java

示例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();
}
 
開發者ID:dajudge,項目名稱:testee.fi,代碼行數:15,代碼來源:TestSetup.java

示例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;
}
 
開發者ID:dajudge,項目名稱:testee.fi,代碼行數:36,代碼來源:TransactionalContext.java

示例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;
}
 
開發者ID:dajudge,項目名稱:testee.fi,代碼行數:7,代碼來源:TestInstanceRealm.java


注:本文中的org.jboss.weld.transaction.spi.TransactionServices類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。