
com.arjuna.ats.jta.cdi.NarayanaTransactionManager Maven / Gradle / Ivy
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013-2019, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.arjuna.ats.jta.cdi;
import java.util.Set;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Destroyed;
import javax.enterprise.context.Initialized;
import javax.enterprise.event.Event;
import javax.enterprise.inject.CreationException;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.NoInitialContextException;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import javax.transaction.TransactionScoped;
import com.arjuna.ats.jta.common.jtaPropertyManager;
import com.arjuna.ats.jta.common.JTAEnvironmentBean;
/**
* A {@link DelegatingTransactionManager} in {@linkplain
* ApplicationScoped application scope} that uses the return value
* that results from invoking the {@link
* com.arjuna.ats.jta.TransactionManager#transactionManager()} method
* as its backing implementation.
*
* @author Laird Nelson
*
* @see com.arjuna.ats.jta.TransactionManager#transactionManager()
*/
@ApplicationScoped
class NarayanaTransactionManager extends DelegatingTransactionManager {
private final Event transactionScopeInitializedBroadcaster;
private final Event
© 2015 - 2025 Weber Informatics LLC | Privacy Policy