|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jdbc.JtaDataSourceImp
AtomikosDataSourceBean
should be used instead.
public class JtaDataSourceImp
A basic datasource implementation that works with Atomikos connection pools and supports heuristic messages. Instances are referenceable in JNDI, but not Serializable.
Note: instead of using this class directly, it is highly recommended that you use one of the other Atomikos DataSourceBean implementations instead.
Constructor Summary | |
---|---|
JtaDataSourceImp(XAConnectionFactory fact,
int poolSize,
int connectionTimeout,
String testQuery,
boolean testOnBorrow)
Deprecated. Creates a new instance. |
Method Summary | |
---|---|
void |
close()
Deprecated. Cleans up the instance, and closes the pool. |
void |
connectionClosed(ConnectionEvent arg)
Deprecated. |
void |
connectionErrorOccurred(ConnectionEvent arg)
Deprecated. |
Connection |
getConnection()
Deprecated. |
Connection |
getConnection(HeuristicMessage msg)
Deprecated. Get a connection to the datasource for the given description of the work. |
Connection |
getConnection(String msg)
Deprecated. Get a connection to the datasource for the given description of the work. |
Connection |
getConnection(String username,
String passwd)
Deprecated. Not implemented in this release; throws SQLException. |
Connection |
getConnection(String user,
String passwd,
HeuristicMessage msg)
Deprecated. Not implemented in this release; throws SQLException. |
Connection |
getConnection(String user,
String passwd,
String msg)
Deprecated. Get a connection to the datasource for the given description of the work. |
int |
getLoginTimeout()
Deprecated. |
PrintWriter |
getLogWriter()
Deprecated. |
PooledConnection |
getPooledConnection()
Deprecated. |
PooledConnection |
getPooledConnection(String user,
String pw)
Deprecated. |
Reference |
getReference()
Deprecated. |
TransactionalResource |
getTransactionalResource()
Deprecated. Get the underlying transactional resource. |
void |
setLoginTimeout(int seconds)
Deprecated. |
void |
setLogWriter(PrintWriter pw)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JtaDataSourceImp(XAConnectionFactory fact, int poolSize, int connectionTimeout, String testQuery, boolean testOnBorrow) throws SQLException
fact
- The XAConnectionFactory to use.poolSize
- The size of the pool.connectionTimeout
- The timeout in seconds for each connection.testQuery
- A test query to validate connection liveness.testOnBorrow
- If true then connections will be tested when gotten from the pool.
SQLException
- On error.Method Detail |
---|
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
DataSource
public Connection getConnection(String username, String passwd) throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String user, String passwd, HeuristicMessage msg) throws SQLException
getConnection
in interface HeuristicDataSource
user
- The user name to use.passwd
- The password.msg
- The heuristic message that best describes the work about to be
done.
SQLException
- On error.public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface ConnectionPoolDataSource
getLogWriter
in interface DataSource
SQLException
DataSource
public void setLogWriter(PrintWriter pw) throws SQLException
setLogWriter
in interface ConnectionPoolDataSource
setLogWriter
in interface DataSource
SQLException
DataSource
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface ConnectionPoolDataSource
setLoginTimeout
in interface DataSource
SQLException
DataSource
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface ConnectionPoolDataSource
getLoginTimeout
in interface DataSource
SQLException
DataSource
public void close()
public TransactionalResource getTransactionalResource()
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
Referenceable
public Connection getConnection(HeuristicMessage msg) throws SQLException
HeuristicDataSource
getConnection
in interface HeuristicDataSource
msg
- The heuristic message that best describes the work about to be
done.
SQLException
- On error.HeuristicDataSource.getConnection(com.atomikos.icatch.HeuristicMessage)
public void connectionClosed(ConnectionEvent arg)
connectionClosed
in interface ConnectionEventListener
ConnectionEventListener.connectionClosed(javax.sql.ConnectionEvent)
public void connectionErrorOccurred(ConnectionEvent arg)
connectionErrorOccurred
in interface ConnectionEventListener
ConnectionEventListener.connectionErrorOccurred(javax.sql.ConnectionEvent)
public PooledConnection getPooledConnection() throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
ConnectionPoolDataSource.getPooledConnection()
public PooledConnection getPooledConnection(String user, String pw) throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
ConnectionPoolDataSource.getPooledConnection(java.lang.String,
java.lang.String)
public Connection getConnection(String msg) throws SQLException
HeuristicDataSource
getConnection
in interface HeuristicDataSource
msg
- The heuristic message that best describes the work about to be
done.
SQLException
- On error.HeuristicDataSource.getConnection(java.lang.String)
public Connection getConnection(String user, String passwd, String msg) throws SQLException
HeuristicDataSource
getConnection
in interface HeuristicDataSource
user
- The user name to use.passwd
- The password.msg
- The heuristic message that best describes the work about to be
done.
SQLException
- On error.HeuristicDataSource.getConnection(java.lang.String,
java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |