Methods Summary |
---|
public java.sql.Connection | getConnection()
try
{
WrappedConnection wc = (WrappedConnection) cm.allocateConnection(mcf, null);
wc.setDataSource(this);
return wc;
}
catch (ResourceException re)
{
throw new NestedSQLException(re);
}
|
public java.sql.Connection | getConnection(java.lang.String user, java.lang.String password)
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 java.io.PrintWriter | getLogWriter()
// TODO: implement this javax.sql.DataSource method
return null;
|
public int | getLoginTimeout()
// TODO: implement this javax.sql.DataSource method
return 0;
|
public javax.naming.Reference | getReference()
return reference;
|
protected int | getTimeLeftBeforeTransactionTimeout()
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(java.io.PrintWriter param1)
// TODO: implement this javax.sql.DataSource method
|
public void | setLoginTimeout(int param1)
// TODO: implement this javax.sql.DataSource method
|
public void | setReference(javax.naming.Reference reference)
this.reference = reference;
|