public class AtomikosDataSourceBean extends AbstractDataSourceBean implements DataSource
DEFAULT_BORROW_CONNECTION_TIMEOUT, DEFAULT_ISOLATION_LEVEL_UNSET, DEFAULT_MAINTENANCE_INTERVAL, DEFAULT_MAX_IDLE_TIME, DEFAULT_MAX_LIFETIME, DEFAULT_POOL_SIZE| Constructor and Description |
|---|
AtomikosDataSourceBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doClose() |
protected ConnectionFactory<Connection> |
doInit() |
int |
getEndExistingXaBranchFlags() |
boolean |
getIgnoreJtaTransactions() |
int |
getJoinExistingXaBranchFlags() |
boolean |
getLocalTransactionMode()
Tests whether local transactions are allowed - defaults to false
for JDBC.
|
boolean |
getPropagateJtaTimeoutToXaResource() |
boolean |
getRecycleActiveConnectionsInTransaction() |
int |
getResumeExistingXaBranchFlags() |
int |
getStartNewXaBranchFlags() |
boolean |
getSupportsTmJoin() |
int |
getSuspendExistingXaBranchFlags() |
XADataSource |
getXaDataSource()
Gets the configured XADataSource (if any).
|
String |
getXaDataSourceClassName()
Gets the XADataSource class name.
|
Properties |
getXaProperties()
Gets the properties used to
configure the XADataSource.
|
Set<String> |
getXaPropertyNamesToHide() |
protected boolean |
isAssignableFromWrappedVendorClass(Class<?> iface) |
protected String |
printXaProperties() |
void |
setEndExistingXaBranchFlags(int vendorSpecificFlags)
Sets vendor-specific XA flags to use when ending an existing XA branch.
|
void |
setJoinExistingXaBranchFlags(int vendorSpecificFlags)
Sets vendor-specific XA flags to use when joining an existing XA branch.
|
void |
setLocalTransactionMode(boolean localTransactionMode)
Sets localTransactionMode.
|
void |
setPropagateJtaTimeoutToXaResource(boolean value)
Sets whether to propagate JTA transaction timeout preferences to the
underlying XAResource.
|
void |
setRecycleActiveConnectionsInTransaction(boolean value)
Should active connections be recycled?
Optional, defaults to false.
|
void |
setResumeExistingXaBranchFlags(int vendorSpecificFlags)
Sets vendor-specific XA flags to use when resuming an existing XA branch.
|
void |
setStartNewXaBranchFlags(int vendorSpecificFlags)
Sets vendor-specific XA start flags used for creating a new branch.
|
void |
setSupportsTmJoin(boolean value)
Sets the behavior related to XA TMJOIN.
|
void |
setSuspendExistingXaBranchFlags(int vendorSpecificFlags)
Sets vendor-specific XA flags to use when suspending an existing XA branch.
|
void |
setXaDataSource(XADataSource xaDataSource)
Sets the XADataSource directly - instead of providing the xaDataSourceClassName and xaProperties.
|
void |
setXaDataSourceClassName(String xaDataSourceClassName)
Sets the fully qualified underlying XADataSource class name.
|
void |
setXaProperties(Properties xaProperties)
Sets the properties (name,value pairs) used to
configure the XADataSource.
|
void |
setXaPropertyNamesToHide(Set<String> xaPropertyNamesToHide)
Sets the XA property names whose values should be hidden in the logs.
|
protected Object |
unwrapVendorInstance() |
assertPoolSizeSettings, close, getBorrowConnectionTimeout, getConcurrentConnectionValidation, getConnection, getConnection, getConnectionValidationInterval, getDefaultIsolationLevel, getFailOnInitIfDatabaseDown, getInitConnectionSql, getLoginTimeout, getLogWriter, getMaintenanceInterval, getMaxIdleTime, getMaxLifetime, getMaxPoolSize, getMinPoolSize, getNetworkTimeout, getParentLogger, getReference, getTestQuery, getUniqueResourceName, getUseDriverBasedConnectionValidation, hasInitConnectionSQL, init, intializeVendorConnection, isWrapperFor, poolAvailableSize, poolTotalSize, refreshPool, setBorrowConnectionTimeout, setConcurrentConnectionValidation, setConnectionValidationInterval, setDefaultIsolationLevel, setFailOnInitIfDatabaseDown, setInitConnectionSql, setLoginTimeout, setLogWriter, setMaintenanceInterval, setMaxIdleTime, setMaxLifetime, setMaxPoolSize, setMinPoolSize, setNetworkTimeout, setPoolSize, setTestQuery, setUniqueResourceName, setUseDriverBasedConnectionValidation, throwAtomikosSQLException, throwAtomikosSQLException, toString, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetConnection, getConnectiongetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterisWrapperFor, unwrapprotected String printXaProperties()
public Properties getXaProperties()
public void setXaProperties(Properties xaProperties)
xaProperties - public String getXaDataSourceClassName()
public void setXaDataSourceClassName(String xaDataSourceClassName)
xaDataSourceClassName - public XADataSource getXaDataSource()
public void setXaDataSource(XADataSource xaDataSource)
xaDataSource - public boolean getLocalTransactionMode()
AbstractDataSourceBeangetLocalTransactionMode in interface ConnectionPoolPropertiesgetLocalTransactionMode in class AbstractDataSourceBeanpublic void setLocalTransactionMode(boolean localTransactionMode)
localTransactionMode - If true, then (for historical reasons) this
datasource supports "hybrid" behaviour: if a JTA transaction is present then
XA will be used, if not then a regular JDBC connection with connection-level
commit/rollback will be returned.
For safety, this property is best left to false: that way, there is no
doubt about the transactional nature of your JDBC work.protected ConnectionFactory<Connection> doInit() throws Exception
doInit in class AbstractDataSourceBeanExceptionprotected void doClose()
doClose in class AbstractDataSourceBeanprotected boolean isAssignableFromWrappedVendorClass(Class<?> iface)
isAssignableFromWrappedVendorClass in class AbstractDataSourceBeanpublic Set<String> getXaPropertyNamesToHide()
protected Object unwrapVendorInstance()
unwrapVendorInstance in class AbstractDataSourceBeanpublic void setXaPropertyNamesToHide(Set<String> xaPropertyNamesToHide)
xaPropertyNamesToHide - public int getStartNewXaBranchFlags()
public void setStartNewXaBranchFlags(int vendorSpecificFlags)
public boolean getPropagateJtaTimeoutToXaResource()
public void setPropagateJtaTimeoutToXaResource(boolean value)
value - public int getJoinExistingXaBranchFlags()
public void setJoinExistingXaBranchFlags(int vendorSpecificFlags)
public int getResumeExistingXaBranchFlags()
public void setResumeExistingXaBranchFlags(int vendorSpecificFlags)
public int getSuspendExistingXaBranchFlags()
public void setSuspendExistingXaBranchFlags(int vendorSpecificFlags)
public int getEndExistingXaBranchFlags()
public void setEndExistingXaBranchFlags(int vendorSpecificFlags)
public boolean getSupportsTmJoin()
getSupportsTmJoin in interface ConnectionPoolPropertiespublic void setSupportsTmJoin(boolean value)
public void setRecycleActiveConnectionsInTransaction(boolean value)
public boolean getRecycleActiveConnectionsInTransaction()
public boolean getIgnoreJtaTransactions()
getIgnoreJtaTransactions in interface ConnectionPoolPropertiesCopyright © 2026. All rights reserved.