|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.atomikos.jdbc.nonxa.NonXADataSourceBean
public class NonXADataSourceBean
Copyright © 2004 Atomikos. All rights reserved. A Bean class for DataSource access to non-XA JDBC implementations. Instances are transaction-aware and can rollback the work done over multiple connections (provided that all work was done in one and the same thread).
| Constructor Summary | |
|---|---|
NonXADataSourceBean()
|
|
| Method Summary | |
|---|---|
void |
close()
Close the instance after use. |
Connection |
getConnection()
|
Connection |
getConnection(HeuristicMessage msg)
Get a connection to the datasource for the given description of the work. |
Connection |
getConnection(String msg)
Get a connection to the datasource for the given description of the work. |
Connection |
getConnection(String user,
String pass)
|
Connection |
getConnection(String user,
String passwd,
HeuristicMessage msg)
Get a connection to the datasource for the given description of the work. |
Connection |
getConnection(String user,
String passwd,
String msg)
Get a connection to the datasource for the given description of the work. |
int |
getConnectionTimeout()
|
String |
getDriverClassName()
|
int |
getLoginTimeout()
|
PrintWriter |
getLogWriter()
|
String |
getPassword()
|
int |
getPoolSize()
|
Reference |
getReference()
|
boolean |
getTestOnBorrow()
|
String |
getUniqueResourceName()
|
String |
getUrl()
|
String |
getUser()
|
String |
getValidatingQuery()
Get the validating query |
void |
setConnectionTimeout(int secs)
Set the refresh timeout interval for pool connections (optional). |
void |
setDriverClassName(String name)
Set the name of the driver class that the DriverManager should use (required). |
void |
setLoginTimeout(int val)
|
void |
setLogWriter(PrintWriter pw)
|
void |
setPassword(String string)
Set the password to use. |
void |
setPoolSize(int size)
Set the minimum size of the pool (optional). |
void |
setTestOnBorrow(boolean value)
Set whether connections should be tested when gotten. |
void |
setUniqueResourceName(String name)
Set the JNDI name to bind on (required). |
void |
setUrl(String url)
Set the URL to use for getting connections (required). |
void |
setUser(String string)
Set the user name to get connections with. |
void |
setValidatingQuery(String query)
Set a validating query for easy verification of connectivity (optional). |
void |
validate()
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 NonXADataSourceBean()
| Method Detail |
|---|
public Connection getConnection(HeuristicMessage msg)
throws SQLException
HeuristicDataSource
getConnection in interface HeuristicDataSourcemsg - The heuristic message that best describes the work about to be
done.
SQLException - On error.HeuristicDataSource.getConnection(com.atomikos.icatch.HeuristicMessage)
public Connection getConnection(String user,
String passwd,
HeuristicMessage msg)
throws SQLException
HeuristicDataSource
getConnection in interface HeuristicDataSourceuser - 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, com.atomikos.icatch.HeuristicMessage)
public Reference getReference()
throws NamingException
getReference in interface ReferenceableNamingExceptionReferenceable.getReference()
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection()
public Connection getConnection(String user,
String pass)
throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection(java.lang.String,
java.lang.String)
public Connection getConnection(String msg)
throws SQLException
HeuristicDataSource
getConnection in interface HeuristicDataSourcemsg - The heuristic message that best describes the work about to be
done.
SQLException - On error.HeuristicDataSource.getConnection(java.lang.String,
java.lang.String, com.atomikos.icatch.HeuristicMessage)
public Connection getConnection(String user,
String passwd,
String msg)
throws SQLException
HeuristicDataSource
getConnection in interface HeuristicDataSourceuser - 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, com.atomikos.icatch.HeuristicMessage)
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface DataSourceSQLExceptionDataSource.getLogWriter()
public void setLogWriter(PrintWriter pw)
throws SQLException
setLogWriter in interface DataSourceSQLExceptionDataSource.setLogWriter(java.io.PrintWriter)
public void setLoginTimeout(int val)
throws SQLException
setLoginTimeout in interface DataSourceSQLExceptionDataSource.setLoginTimeout(int)
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface DataSourceSQLExceptionDataSource.getLoginTimeout()public int getConnectionTimeout()
public String getDriverClassName()
public String getUniqueResourceName()
public String getPassword()
public int getPoolSize()
public String getUrl()
public String getUser()
public void setTestOnBorrow(boolean value)
value - Whether to test connections when taken out of the pool.public boolean getTestOnBorrow()
public void setConnectionTimeout(int secs)
secs - The value in seconds.public void setDriverClassName(String name)
name - The name.public void setUniqueResourceName(String name)
name - The JNDI name.public void setPassword(String string)
string - public void setPoolSize(int size)
size - public void setUrl(String url)
url - public void setUser(String string)
string - public void setValidatingQuery(String query)
query - public String getValidatingQuery()
public void close()
public void validate()
throws SQLException
SQLException - If validation fails.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||