|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.jdbc.standard.StandardPooledConnection
public class StandardPooledConnection
Provides an implementation of javax.sql.PooledConnection which is completely generic (i.e. it relies only on JDBC 1 functionality). This class maintains a physical database connection which is passed to each StandardXAConnectionHandle when it is created. It is the StandardXAConnectionHandle object which the application receives and which it perceives as the java.sql.Connection object. StandardXAConnectionHandle objects pass PreparedStatements back to the StandardPooledConnection so that they can be retained across StandardXAConnectionHandle instantiations.
Field Summary | |
---|---|
java.sql.Connection |
con
|
StandardConnectionHandle |
connectionHandle
|
protected StandardConnectionPoolDataSource |
dataSource
|
Logger |
log
|
Constructor Summary | |
---|---|
StandardPooledConnection(StandardConnectionPoolDataSource dataSource,
java.lang.String user,
java.lang.String password)
Creates the physical database connection. |
Method Summary | |
---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
|
void |
close()
|
void |
connectionErrorOccurred(javax.sql.ConnectionEvent event)
Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application This method is automatically called when a fatal error is detected on the base connection. |
java.sql.Connection |
getConnection()
Creates a new StandardConnectionHandle for use by an application. |
java.sql.Connection |
getPhysicalConnection()
Access method allowing access to the underlying physical connection. |
protected void |
newConnectionHandle()
|
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
|
void |
setLogger(Logger alog)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected StandardConnectionPoolDataSource dataSource
public java.sql.Connection con
public StandardConnectionHandle connectionHandle
public Logger log
Constructor Detail |
---|
public StandardPooledConnection(StandardConnectionPoolDataSource dataSource, java.lang.String user, java.lang.String password) throws java.sql.SQLException
java.sql.SQLException
Method Detail |
---|
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
protected void newConnectionHandle()
public void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
java.sql.SQLException
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
public void connectionErrorOccurred(javax.sql.ConnectionEvent event)
public java.sql.Connection getPhysicalConnection()
public void setLogger(Logger alog)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |