com.atomikos.jdbc
Class AtomikosDataSourceBean

java.lang.Object
  extended by com.atomikos.jdbc.AbstractDataSourceBean
      extended by com.atomikos.jdbc.AtomikosDataSourceBean
All Implemented Interfaces:
ConnectionPoolProperties, HeuristicDataSource, Serializable, Referenceable, DataSource

public class AtomikosDataSourceBean
extends AbstractDataSourceBean

The preferred class for using Atomikos connection pooling. Use an instance of this class if you want to use Atomikos JTA-enabled connection pooling. All you need to do is construct an instance and set the required properties as outlined below. The resulting bean will automatically register with the transaction service (for recovery) and take part in active transactions. All SQL done over connections (gotten from this class) will participate in JTA transactions.

See Also:
Serialized Form

Constructor Summary
AtomikosDataSourceBean()
           
 
Method Summary
protected  void doClose()
           
protected  ConnectionFactory doInit()
           
 XADataSource getXaDataSource()
          Gets the configured XADataSource (if any).
 String getXaDataSourceClassName()
          Get the XADataSource class name.
 Properties getXaProperties()
          Gets the properties used to configure the XADataSource.
protected  String printXaProperties()
           
 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.
 String toString()
           
 
Methods inherited from class com.atomikos.jdbc.AbstractDataSourceBean
close, getBorrowConnectionTimeout, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getDefaultIsolationLevel, getLocalTransactionMode, getLoginTimeout, getLogWriter, getMaintenanceInterval, getMaxIdleTime, getMaxPoolSize, getMinPoolSize, getReapTimeout, getReference, getTestQuery, getUniqueResourceName, init, poolAvailableSize, poolTotalSize, setBorrowConnectionTimeout, setDefaultIsolationLevel, setLoginTimeout, setLogWriter, setMaintenanceInterval, setMaxIdleTime, setMaxPoolSize, setMinPoolSize, setPoolSize, setReapTimeout, setTestQuery, setUniqueResourceName, throwAtomikosSQLException, throwAtomikosSQLException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomikosDataSourceBean

public AtomikosDataSourceBean()
Method Detail

printXaProperties

protected String printXaProperties()

getXaProperties

public Properties getXaProperties()
Gets the properties used to configure the XADataSource.


setXaProperties

public void setXaProperties(Properties xaProperties)
Sets the properties (name,value pairs) used to configure the XADataSource. Required, unless you call setXaDataSource directly.

Parameters:
xaProperties -

getXaDataSourceClassName

public String getXaDataSourceClassName()
Get the XADataSource class name.


setXaDataSourceClassName

public void setXaDataSourceClassName(String xaDataSourceClassName)
Sets the fully qualified underlying XADataSource class name. Required, unless you call setXaDataSource directly.

Parameters:
xaDataSourceClassName -

getXaDataSource

public XADataSource getXaDataSource()
Gets the configured XADataSource (if any).

Returns:
The instance, or null if none.

setXaDataSource

public void setXaDataSource(XADataSource xaDataSource)
Sets the XADataSource directly - instead of providing the xaDataSourceClassName and xaProperties.

Parameters:
xaDataSource -

doInit

protected ConnectionFactory doInit()
                            throws Exception
Specified by:
doInit in class AbstractDataSourceBean
Throws:
Exception

doClose

protected void doClose()
Specified by:
doClose in class AbstractDataSourceBean

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.