Openfire 3.4.1 Javadoc

org.jivesoftware.database
Class ConnectionWrapper

java.lang.Object
  extended by org.jivesoftware.database.AbstractConnection
      extended by org.jivesoftware.database.ConnectionWrapper
All Implemented Interfaces:
Connection

public class ConnectionWrapper
extends org.jivesoftware.database.AbstractConnection

An implementation of the Connection interface that wraps an underlying Connection object. It releases the connection back to a connection pool when Connection.close() is called.

Author:
Jive Software

Field Summary
 boolean checkedout
           
 long checkinTime
           
 long createTime
           
 Exception exception
           
 boolean hasLoggedException
           
 long lockTime
           
 ConnectionPool pool
           
 
Fields inherited from class org.jivesoftware.database.AbstractConnection
connection
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
ConnectionWrapper(Connection connection, ConnectionPool pool)
           
 
Method Summary
 void close()
          Instead of closing the underlying connection, we simply release it back into the pool.
 boolean isCheckedOut()
           
 void setConnection(Connection connection)
           
 String toString()
           
 
Methods inherited from class org.jivesoftware.database.AbstractConnection
clearWarnings, commit, createStatement, createStatement, createStatement, getAutoCommit, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pool

public ConnectionPool pool

checkedout

public boolean checkedout

createTime

public long createTime

lockTime

public long lockTime

checkinTime

public long checkinTime

exception

public Exception exception

hasLoggedException

public boolean hasLoggedException
Constructor Detail

ConnectionWrapper

public ConnectionWrapper(Connection connection,
                         ConnectionPool pool)
Method Detail

setConnection

public void setConnection(Connection connection)

close

public void close()
           throws SQLException
Instead of closing the underlying connection, we simply release it back into the pool.

Specified by:
close in interface Connection
Overrides:
close in class org.jivesoftware.database.AbstractConnection
Throws:
SQLException

toString

public String toString()
Overrides:
toString in class Object

isCheckedOut

public boolean isCheckedOut()

Openfire 3.4.1 Javadoc

Copyright © 2003-2007 Jive Software.