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 ofPoolingDataSource
. Provides sensible defaults and also supports direct wrapping of aXADataSource
instance.- Since:
- 1.2.0
- See Also:
- Serialized Form
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PoolingDataSourceBean.DirectXADataSource
Constructor Summary
Constructors Constructor Description PoolingDataSourceBean()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theXADataSource
directly, instead of callingResourceBean.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
Constructor Detail
PoolingDataSourceBean
public PoolingDataSourceBean()
Method Detail
init
public void init()
- Specified by:
init
in interfacebitronix.tm.resource.common.XAResourceProducer
- Overrides:
init
in classbitronix.tm.resource.jdbc.PoolingDataSource
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
setDataSource
public void setDataSource(XADataSource dataSource)
Set theXADataSource
directly, instead of callingResourceBean.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 interfacebitronix.tm.resource.common.XAResourceProducer
- Overrides:
createPooledConnection
in classbitronix.tm.resource.jdbc.PoolingDataSource
- Throws:
Exception
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Throws:
SQLFeatureNotSupportedException