io.quarkus.narayana.jta.runtime.NarayanaJtaProducers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-narayana-jta Show documentation
Show all versions of quarkus-narayana-jta Show documentation
Offer JTA transaction support (included in Hibernate ORM)
package io.quarkus.narayana.jta.runtime;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Produces;
import javax.transaction.TransactionSynchronizationRegistry;
import org.jboss.tm.JBossXATerminator;
import org.jboss.tm.XAResourceRecoveryRegistry;
import org.jboss.tm.usertx.UserTransactionRegistry;
import com.arjuna.ats.internal.jbossatx.jta.jca.XATerminator;
import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple;
import com.arjuna.ats.jbossatx.jta.RecoveryManagerService;
import com.arjuna.ats.jta.UserTransaction;
import io.quarkus.arc.Unremovable;
@Dependent
public class NarayanaJtaProducers {
@Produces
@ApplicationScoped
public UserTransactionRegistry userTransactionRegistry() {
return new UserTransactionRegistry();
}
@Produces
@ApplicationScoped
public javax.transaction.UserTransaction userTransaction() {
return UserTransaction.userTransaction();
}
@Produces
@ApplicationScoped
public XAResourceRecoveryRegistry xaResourceRecoveryRegistry() {
return new RecoveryManagerService();
}
@Produces
@ApplicationScoped
@Unremovable
public TransactionSynchronizationRegistry transactionSynchronizationRegistry() {
return new TransactionSynchronizationRegistryImple();
}
@Produces
@ApplicationScoped
public JBossXATerminator xaTerminator() {
return new XATerminator();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy