Search in sources :

Example 1 with WeldTransactionServices

use of org.jboss.as.weld.services.bootstrap.WeldTransactionServices in project wildfly by wildfly.

the class TransactionsBootstrapDependencyInstaller method install.

@Override
public ServiceName install(ServiceTarget serviceTarget, DeploymentUnit deploymentUnit, boolean jtsEnabled) {
    final WeldTransactionServices weldTransactionServices = new WeldTransactionServices(jtsEnabled);
    final ServiceName weldTransactionServiceName = deploymentUnit.getServiceName().append(WeldTransactionServices.SERVICE_NAME);
    serviceTarget.addService(weldTransactionServiceName, weldTransactionServices).addDependency(TransactionManagerService.SERVICE_NAME, TransactionManager.class, weldTransactionServices.getInjectedTransactionManager()).addDependency(UserTransactionService.SERVICE_NAME, UserTransaction.class, weldTransactionServices.getInjectedTransaction()).install();
    return weldTransactionServiceName;
}
Also used : UserTransaction(javax.transaction.UserTransaction) WeldTransactionServices(org.jboss.as.weld.services.bootstrap.WeldTransactionServices) ServiceName(org.jboss.msc.service.ServiceName)

Aggregations

UserTransaction (javax.transaction.UserTransaction)1 WeldTransactionServices (org.jboss.as.weld.services.bootstrap.WeldTransactionServices)1 ServiceName (org.jboss.msc.service.ServiceName)1