Class PoolingConnectionFactoryBean

  • All Implemented Interfaces:
    bitronix.tm.resource.common.XAResourceProducer, bitronix.tm.resource.jms.PoolingConnectionFactoryMBean, Serializable, javax.jms.ConnectionFactory, Referenceable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    @ConfigurationProperties(prefix="spring.jta.bitronix.connectionfactory")
    public class PoolingConnectionFactoryBean
    extends bitronix.tm.resource.jms.PoolingConnectionFactory
    implements org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    Spring friendly version of PoolingConnectionFactory. Provides sensible defaults and also supports direct wrapping of a XAConnectionFactory instance.
    Since:
    1.2.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidafterPropertiesSet() 
      bitronix.tm.resource.common.XAStatefulHoldercreatePooledConnection​(Object xaFactory, bitronix.tm.resource.common.ResourceBean bean) 
      voiddestroy() 
      protected javax.jms.XAConnectionFactorygetConnectionFactory() 
      voidinit() 
      voidsetBeanName​(String name) 
      voidsetConnectionFactory​(javax.jms.XAConnectionFactory connectionFactory)
      Set the XAConnectionFactory directly, instead of calling ResourceBean.setClassName(String).
      • Methods inherited from class bitronix.tm.resource.jms.PoolingConnectionFactory

        close, createConnection, createConnection, endRecovery, findXAResourceHolder, getCacheProducersConsumers, getInPoolSize, getPassword, getReference, getTestConnections, getTotalPoolSize, getUser, isFailed, reset, setCacheProducersConsumers, setFailed, setPassword, setTestConnections, setUser, startRecovery, toString
      • Methods inherited from class bitronix.tm.resource.common.ResourceBean

        getAcquireIncrement, getAcquisitionInterval, getAcquisitionTimeout, getAllowLocalTransactions, getApplyTransactionTimeout, getAutomaticEnlistingEnabled, getClassName, getDeferConnectionRelease, getDriverProperties, getIgnoreRecoveryFailures, getMaxIdleTime, getMaxPoolSize, getMinPoolSize, getShareTransactionConnections, getTwoPcOrderingPosition, getUniqueName, getUseTmJoin, incCreatedResourcesCounter, isDisabled, setAcquireIncrement, setAcquisitionInterval, setAcquisitionTimeout, setAllowLocalTransactions, setApplyTransactionTimeout, setAutomaticEnlistingEnabled, setClassName, setDeferConnectionRelease, setDisabled, setDriverProperties, setIgnoreRecoveryFailures, setMaxIdleTime, setMaxPoolSize, setMinPoolSize, setShareTransactionConnections, setTwoPcOrderingPosition, setUniqueName, setUseTmJoin
      • Methods inherited from interface javax.jms.ConnectionFactory

        createContext, createContext, createContext, createContext
      • Methods inherited from interface bitronix.tm.resource.jms.PoolingConnectionFactoryMBean

        getMaxPoolSize, getMinPoolSize, isDisabled, setDisabled
      • Methods inherited from interface bitronix.tm.resource.common.XAResourceProducer

        getUniqueName
    • Method Detail

      • init

        public void init()
        Specified by:
        init in interface bitronix.tm.resource.common.XAResourceProducer
        Overrides:
        init in class bitronix.tm.resource.jms.PoolingConnectionFactory
      • setBeanName

        public void setBeanName​(String name)
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception
      • setConnectionFactory

        public void setConnectionFactory​(javax.jms.XAConnectionFactory connectionFactory)
        Set the XAConnectionFactory directly, instead of calling ResourceBean.setClassName(String).
        Parameters:
        connectionFactory - the connection factory to use
      • createPooledConnection

        public bitronix.tm.resource.common.XAStatefulHolder createPooledConnection​(Object xaFactory,
                                                                                   bitronix.tm.resource.common.ResourceBean bean)
                                                                            throws Exception
        Specified by:
        createPooledConnection in interface bitronix.tm.resource.common.XAResourceProducer
        Overrides:
        createPooledConnection in class bitronix.tm.resource.jms.PoolingConnectionFactory
        Throws:
        Exception