org.springframework.boot.jta.bitronix

Class PoolingDataSourceBean

  • java.lang.Object
    • bitronix.tm.resource.common.ResourceBean
      • bitronix.tm.resource.jdbc.PoolingDataSource
        • org.springframework.boot.jta.bitronix.PoolingDataSourceBean
  • All Implemented Interfaces:
    bitronix.tm.resource.common.XAResourceProducer, bitronix.tm.resource.jdbc.PoolingDataSourceMBean, Serializable, Wrapper, Referenceable, CommonDataSource, DataSource, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean


    @ConfigurationProperties(prefix="spring.jta.bitronix.datasource")
    public class PoolingDataSourceBean
    extends bitronix.tm.resource.jdbc.PoolingDataSource
    implements org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
    Spring friendly version of PoolingDataSource. Provides sensible defaults and also supports direct wrapping of a XADataSource instance.
    Since:
    1.2.0
    Author:
    Phillip Webb, Josh Long, Andy Wilkinson
    See Also:
    Serialized Form
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void afterPropertiesSet() 
      bitronix.tm.resource.common.XAStatefulHolder createPooledConnection(Object xaFactory, bitronix.tm.resource.common.ResourceBean bean) 
      protected XADataSource getDataSource() 
      Logger getParentLogger() 
      void init() 
      void setBeanName(String name) 
      void setDataSource(XADataSource dataSource)
      Set the XADataSource directly, instead of calling ResourceBean.setClassName(String).
      • Methods inherited from class bitronix.tm.resource.jdbc.PoolingDataSource

        addConnectionCustomizer, close, endRecovery, findXAResourceHolder, getConnection, getConnection, getCursorHoldability, getInPoolSize, getIsolationLevel, getLocalAutoCommit, getLoginTimeout, getLogWriter, getPreparedStatementCacheSize, getReference, getTestQuery, getTotalPoolSize, isEnableJdbc4ConnectionTest, isFailed, isWrapperFor, removeConnectionCustomizer, reset, setCursorHoldability, setEnableJdbc4ConnectionTest, setFailed, setIsolationLevel, setLocalAutoCommit, setLoginTimeout, setLogWriter, setPreparedStatementCacheSize, setTestQuery, startRecovery, toString, unwrap
      • 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 bitronix.tm.resource.common.XAResourceProducer

        getUniqueName
      • Methods inherited from interface bitronix.tm.resource.jdbc.PoolingDataSourceMBean

        getMaxPoolSize, getMinPoolSize, isDisabled, setDisabled
    • Constructor Detail

      • PoolingDataSourceBean

        public PoolingDataSourceBean()
    • Method Detail

      • init

        public void init()
        Specified by:
        init in interface bitronix.tm.resource.common.XAResourceProducer
        Overrides:
        init in class bitronix.tm.resource.jdbc.PoolingDataSource
      • 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
      • setDataSource

        public void setDataSource(XADataSource dataSource)
        Set the XADataSource directly, instead of calling ResourceBean.setClassName(String).
        Parameters:
        dataSource - the data source to use
      • getDataSource

        protected final XADataSource getDataSource()
      • 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.jdbc.PoolingDataSource
        Throws:
        Exception

Copyright © 2015 Pivotal Software, Inc.. All rights reserved.