|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jdbc.SimpleDataSourceBean
AtomikosDataSourceBean
should be used instead.
public class SimpleDataSourceBean
An Atomikos DataSource implementation.
Constructor Summary | |
---|---|
SimpleDataSourceBean()
Deprecated. |
Method Summary | |
---|---|
void |
close()
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 user,
String pw)
Deprecated. |
Connection |
getConnection(String user,
String pw,
HeuristicMessage msg)
Deprecated. Get a connection to the datasource for the given description of the work. |
Connection |
getConnection(String user,
String passwd,
String msg)
Deprecated. Get a connection to the datasource for the given description of the work. |
int |
getConnectionPoolSize()
Deprecated. Get the size of the connection pool. |
int |
getConnectionTimeout()
Deprecated. Get the timeout after which connections are checked for liveness. |
boolean |
getExclusiveConnectionMode()
Deprecated. Get the sharing preference. |
int |
getLoginTimeout()
Deprecated. |
PrintWriter |
getLogWriter()
Deprecated. |
PooledConnection |
getPooledConnection()
Deprecated. |
PooledConnection |
getPooledConnection(String user,
String pw)
Deprecated. |
Reference |
getReference()
Deprecated. |
boolean |
getTestOnBorrow()
Deprecated. Get whether connections should be tested when gotten. |
protected TransactionalResource |
getTransactionalResource()
Deprecated. Get the transactional resource. |
String |
getUniqueResourceName()
Deprecated. Get the unique resource name for this instance. |
String |
getValidatingQuery()
Deprecated. Get the validating query. |
XADataSource |
getXaDataSource()
Deprecated. Gets the configured XADataSource instance (if set). |
String |
getXaDataSourceClassName()
Deprecated. Get the full name of the vendor-specific XADataSource class. |
String |
getXaDataSourceProperties()
Deprecated. Get the XADataSource properties as one large string. |
void |
init()
Deprecated. Init method to setup the bean for recovery and other init stuff. |
void |
setConnectionPoolSize(int poolSize)
Deprecated. Set the size of the internal connection pool (optional). |
void |
setConnectionTimeout(int timeout)
Deprecated. Set the timeout after which connections should be checked for liveness (optional). |
void |
setExclusiveConnectionMode(boolean mode)
Deprecated. Set the sharing preferences (optional). |
void |
setLoginTimeout(int seconds)
Deprecated. |
void |
setLogWriter(PrintWriter out)
Deprecated. |
void |
setTestOnBorrow(boolean value)
Deprecated. Set whether connections should be tested when gotten (optional). |
void |
setUniqueResourceName(String resourceName)
Deprecated. Set the identifying name for this data source (required). |
void |
setValidatingQuery(String query)
Deprecated. Set the validating query for this datasource (optional). |
void |
setXaDataSource(XADataSource xads)
Deprecated. Sets the (preconfigured) XADataSource instance. |
void |
setXaDataSourceClassName(String name)
Deprecated. Set the fully qualified name of the XADataSource class to use (required). |
void |
setXaDataSourceProperties(String properties)
Deprecated. Set the XADataSource-specific properties as a semicolon-separated list of string values (required unless the XADataSource instance is set directly). |
void |
validate()
Deprecated. Perform validation based on the validating query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleDataSourceBean()
Method Detail |
---|
public void init() throws SQLException
SQLException
public void setUniqueResourceName(String resourceName)
resourceName
- public String getUniqueResourceName()
public void setConnectionPoolSize(int poolSize)
poolSize
- The size of the pool.public int getConnectionPoolSize()
public void setTestOnBorrow(boolean value)
value
- True if connections should be tested when gotten.public boolean getTestOnBorrow()
public void setConnectionTimeout(int timeout)
timeout
- The timeout in seconds.public int getConnectionTimeout()
public void setExclusiveConnectionMode(boolean mode)
mode
- The mode. If true, then connections are not shared when they
are in a transaction. This is the safest setting and allows to
avoid problems with databases that don't implement XA
correctly (such as Oracle). Setting this to true will slightly
affect performance of connection pooling in a negative way.
Default is true.public boolean getExclusiveConnectionMode()
protected TransactionalResource getTransactionalResource()
public void setValidatingQuery(String query)
query
- The SQL query that should work if the connectivity is made.public String getValidatingQuery()
public void setXaDataSourceClassName(String name)
name
- The vendor-specific XADataSource class to use. Ignored if the XADataSource instance is set directly.public String getXaDataSourceClassName()
public void setXaDataSourceProperties(String properties)
properties
- The properties expressed as a semi-colon separated list. For
example: port=8000;user=demo;password=sa
Ignored if the XADataSource instance is set directly.public String getXaDataSourceProperties()
public void setXaDataSource(XADataSource xads)
xads
- The instance.public XADataSource getXaDataSource()
public void validate() throws SQLException
SQLException
- If validation fails.public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
HeuristicDataSource
public Connection getConnection(String user, String pw) throws SQLException
getConnection
in interface DataSource
SQLException
HeuristicDataSource
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
public Connection getConnection(String user, String pw, HeuristicMessage msg) throws SQLException
HeuristicDataSource
getConnection
in interface HeuristicDataSource
user
- The user name to use.pw
- The password.msg
- The heuristic message that best describes the work about to be
done.
SQLException
- On error.HeuristicDataSource
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
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
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface ConnectionPoolDataSource
getLoginTimeout
in interface DataSource
SQLException
HeuristicDataSource
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface ConnectionPoolDataSource
getLogWriter
in interface DataSource
SQLException
HeuristicDataSource
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface ConnectionPoolDataSource
setLoginTimeout
in interface DataSource
SQLException
HeuristicDataSource
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface ConnectionPoolDataSource
setLogWriter
in interface DataSource
SQLException
HeuristicDataSource
public void close() throws SQLException
SQLException
HeuristicDataSource
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
Referenceable
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |