| Method from org.jboss.resource.adapter.jdbc.WrapperDataSource Detail: |
protected void checkTransactionActive() throws SQLException {
if (cm == null)
throw new SQLException("No connection manager");
try
{
if (cm instanceof JTATransactionChecker)
((JTATransactionChecker) cm).checkTransactionActive();
}
catch (Exception e)
{
throw new NestedSQLException(e);
}
}
Check whether a tranasction is active |
public Connection getConnection() throws SQLException {
try
{
WrappedConnection wc = (WrappedConnection) cm.allocateConnection(mcf, null);
wc.setDataSource(this);
return wc;
}
catch (ResourceException re)
{
throw new NestedSQLException(re);
}
}
|
public Connection getConnection(String user,
String password) throws SQLException {
ConnectionRequestInfo cri = new WrappedConnectionRequestInfo(user, password);
try
{
WrappedConnection wc = (WrappedConnection) cm.allocateConnection(mcf, cri);
wc.setDataSource(this);
return wc;
}
catch (ResourceException re)
{
throw new NestedSQLException(re);
}
}
|
public PrintWriter getLogWriter() throws SQLException {
// TODO: implement this javax.sql.DataSource method
return null;
}
|
public int getLoginTimeout() throws SQLException {
// TODO: implement this javax.sql.DataSource method
return 0;
}
|
public Reference getReference() {
return reference;
}
|
protected int getTimeLeftBeforeTransactionTimeout() throws SQLException {
try
{
if (cm instanceof TransactionTimeoutConfiguration)
{
long timeout = ((TransactionTimeoutConfiguration) cm).getTimeLeftBeforeTransactionTimeout(true);
// No timeout
if (timeout == -1)
return -1;
// Round up to the nearest second
long result = timeout / 1000;
if ((result % 1000) != 0)
++result;
return (int) result;
}
else
return -1;
}
catch (RollbackException e)
{
throw new NestedSQLException(e);
}
}
|
public void setLogWriter(PrintWriter param1) throws SQLException {
// TODO: implement this javax.sql.DataSource method
}
|
public void setLoginTimeout(int param1) throws SQLException {
// TODO: implement this javax.sql.DataSource method
}
|
public void setReference(Reference reference) {
this.reference = reference;
}
|