Methods Summary |
---|
public void | clearWarnings()Simple method to log any warnings on an entry (connection), and
then clear them.
try {
SQLWarning currSQLWarning = connection.getWarnings();
while (currSQLWarning != null) {
StringBuffer logBuffer =
new StringBuffer(256)
.append("Warnings on connection ")
.append(id)
.append(currSQLWarning);
container.debug(logBuffer.toString());
currSQLWarning = currSQLWarning.getNextWarning();
}
connection.clearWarnings();
} catch (SQLException sqle) {
container.debug("Error while clearing exceptions on " + id);
// It will probably get killed by itself before too long if this failed
}
|
public void | close()
clearWarnings();
container.releaseConnection(this);
|
public final void | commit()
connection.commit();
|
public final java.sql.Statement | createStatement()
return connection.createStatement();
|
public final java.sql.Statement | createStatement(int resultSetType, int resultSetConcurrency)
return connection.createStatement(resultSetType, resultSetConcurrency);
|
public final java.sql.Statement | createStatement(int resulSetType, int resultSetConcurrency, int resultSetHoldability)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
protected void | finalize()Need to clean up the connection
container.debug("Closing connection " + id);
try {
connection.close();
} catch (SQLException ex) {
StringBuffer warnBuffer =
new StringBuffer(64)
.append("Cannot close connection ")
.append(id)
.append(" on finalize");
container.warn(warnBuffer.toString());
}
// Dump the stack trace of whoever created this connection
if (getTrace() != null) {
StringWriter sout = new StringWriter();
trace.printStackTrace(new PrintWriter(sout, true));
container.info(sout.toString());
}
|
public final boolean | getAutoCommit()
return connection.getAutoCommit();
|
public final java.lang.String | getCatalog()
return connection.getCatalog();
|
public long | getCreateDate()Insert the method's description here.
Creation date: (8/24/99 11:43:19 AM)
return createDate;
|
public final int | getHoldability()
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public int | getId()Insert the method's description here.
Creation date: (8/24/99 12:09:01 PM)
return id;
|
public long | getLastActivity()Insert the method's description here.
Creation date: (8/24/99 11:43:19 AM)
return lastActivity;
|
public long | getLockTime()Insert the method's description here.
Creation date: (8/24/99 11:43:19 AM)
return lockTime;
|
public final java.sql.DatabaseMetaData | getMetaData()
return connection.getMetaData();
|
public int | getStatus()Insert the method's description here.
Creation date: (8/24/99 11:43:19 AM)
return status;
|
public java.lang.String | getString()
StringBuffer poolConnStringBuffer =
new StringBuffer(64)
.append(getId())
.append(": ")
.append(connection.toString());
return poolConnStringBuffer.toString();
|
public java.lang.Throwable | getTrace()Insert the method's description here.
Creation date: (8/24/99 2:33:38 PM)
return trace;
|
public final int | getTransactionIsolation()
return connection.getTransactionIsolation();
|
public final java.util.Map | getTypeMap()
return connection.getTypeMap();
|
public final java.sql.SQLWarning | getWarnings()
return connection.getWarnings();
|
public boolean | isClosed()Returns whether this entry is closed.
return connection.isClosed();
|
public final boolean | isReadOnly()
return connection.isReadOnly();
|
public synchronized boolean | lock()Locks an entry for anybody else using it
if (DEEP_DEBUG) {
System.out.println("Trying to lock");
}
if (status != PoolConnEntry.AVAILABLE) {
return false;
}
if (DEEP_DEBUG) {
System.out.println("Available");
}
if (false) {
//There really is no sense in doing this...
// maybe make it a conf option at some point, but really slows
// down the pooling.
if (connection.isClosed()) {
throw new SQLException("Connection has been closed.");
}
if (DEEP_DEBUG) {
System.out.println("not closed");
}
}
status = PoolConnEntry.ACTIVE;
lockTime = System.currentTimeMillis();
lastActivity = lockTime;
trace = new Throwable();
clearWarnings();
if (DEEP_DEBUG) {
System.out.println("Returning");
}
return true;
|
public final java.lang.String | nativeSQL(java.lang.String sql)
return connection.nativeSQL( sql );
|
public final java.sql.CallableStatement | prepareCall(java.lang.String sql)
return connection.prepareCall(sql);
|
public final java.sql.CallableStatement | prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
return connection.prepareCall( sql, resultSetType, resultSetConcurrency );
|
public final java.sql.CallableStatement | prepareCall(java.lang.String sql, int resulSetType, int resultSetConcurrency, int resultSetHoldability)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final java.sql.PreparedStatement | prepareStatement(java.lang.String sql)
return connection.prepareStatement(sql);
|
public final java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
return connection.prepareStatement( sql, resultSetType, resultSetConcurrency);
|
public final java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int resulSetType, int resultSetConcurrency, int resultSetHoldability)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int autoGeneratedKeys)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int[] columnIndexes)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final java.sql.PreparedStatement | prepareStatement(java.lang.String sql, java.lang.String[] columnNames)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final void | releaseSavepoint(java.sql.Savepoint savepoint)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final void | rollback()
connection.rollback();
|
public final void | rollback(java.sql.Savepoint savepoint)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final void | setAutoCommit(boolean autoCommit)
connection.setAutoCommit( autoCommit );
|
public final void | setCatalog(java.lang.String catalog)
connection.setCatalog( catalog );
|
public final void | setHoldability(int holdability)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final void | setReadOnly(boolean readOnly)
connection.setReadOnly( readOnly );
|
public final java.sql.Savepoint | setSavepoint()
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final java.sql.Savepoint | setSavepoint(java.lang.String savepoint)
throw new SQLException("This is not a Jdbc 3.0 Compliant Connection");
|
public final void | setTransactionIsolation(int level)
connection.setTransactionIsolation(level);
|
public final void | setTypeMap(java.util.Map map)
connection.setTypeMap( map );
|
public synchronized void | unlock()Resets flags on an entry for reuse in the pool
lastActivity = System.currentTimeMillis();
trace = null;
status = AVAILABLE;
|