|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.jdbc.EmbedPooledConnection
A PooledConnection object is a connection object that provides hooks for connection pool management.
This is Cloudscape's implementation of a PooledConnection.
| Field Summary | |
private int |
connectionId
The id for this connection. |
protected BrokeredConnection |
currentConnectionHandle
|
protected ReferenceableDataSource |
dataSource
|
protected int |
defaultIsolationLevel
|
private boolean |
defaultReadOnly
|
private java.util.Vector |
eventListener
|
private static int |
idCounter
Static counter for connection ids |
private java.lang.String |
idString
String representation of id |
private boolean |
isActive
|
private java.lang.String |
password
|
protected EmbedConnection |
realConnection
|
private boolean |
requestPassword
True if the password was passed in on the connection request, false if it came from the data source property. |
private java.lang.String |
username
|
| Constructor Summary | |
(package private) |
EmbedPooledConnection(ReferenceableDataSource ds,
java.lang.String u,
java.lang.String p,
boolean requestPassword)
|
| Method Summary | |
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Add an event listener. |
protected void |
checkActive()
|
void |
checkAutoCommit(boolean autoCommit)
Allow control over setting auto commit mode. |
void |
checkCommit()
Allow control over calling commit. |
void |
checkHoldCursors(int holdability)
Are held cursors allowed. |
void |
checkRollback()
Allow control over calling rollback. |
void |
checkSavepoint()
Allow control over creating a Savepoint (JDBC 3.0) |
void |
close()
Close the Pooled connection. |
protected void |
closeCurrentConnectionHandle()
In this case the Listeners are *not* notified. |
boolean |
closingConnection()
Close called on BrokeredConnection. |
java.sql.Connection |
getConnection()
Create an object handle for a database connection. |
protected java.sql.Connection |
getNewCurrentConnectionHandle()
|
(package private) java.lang.String |
getPassword()
|
int |
getPrepareIsolation()
Get prepare isolation level. |
java.sql.Connection |
getRealConnection()
Return the real JDBC connection for the brokered connection. |
(package private) java.lang.String |
getUsername()
|
private int |
nextId()
|
void |
notifyClose()
|
void |
notifyError(java.sql.SQLException exception)
|
void |
notifyException(java.sql.SQLException sqle)
Notify the control class that a SQLException was thrown during a call on one of the brokered connection's methods. |
protected void |
openRealConnection()
|
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Remove an event listener. |
protected void |
resetRealConnection()
|
void |
setDrdaID(java.lang.String drdaID)
set DrdaId for this connection. |
void |
setPrepareIsolation(int level)
Set the internal isolation level to use for preparing statements. |
java.lang.String |
toString()
Get the string representation of this pooled connection. |
java.sql.CallableStatement |
wrapStatement(java.sql.CallableStatement cs,
java.lang.String sql)
No need to wrap statements for PooledConnections. |
java.sql.PreparedStatement |
wrapStatement(java.sql.PreparedStatement ps,
java.lang.String sql,
java.lang.Object generatedKeys)
No need to wrap statements for PooledConnections. |
java.sql.Statement |
wrapStatement(java.sql.Statement s)
No need to wrap statements for PooledConnections. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static int idCounter
private int connectionId
private java.lang.String idString
private java.util.Vector eventListener
protected EmbedConnection realConnection
protected int defaultIsolationLevel
private boolean defaultReadOnly
protected BrokeredConnection currentConnectionHandle
protected final ReferenceableDataSource dataSource
private final java.lang.String username
private final java.lang.String password
private final boolean requestPassword
private boolean isActive
| Constructor Detail |
EmbedPooledConnection(ReferenceableDataSource ds,
java.lang.String u,
java.lang.String p,
boolean requestPassword)
throws java.sql.SQLException
| Method Detail |
private int nextId()
java.lang.String getUsername()
java.lang.String getPassword()
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectionjava.sql.SQLException - - if a database-access error occurs.
protected final void openRealConnection()
throws java.sql.SQLException
java.sql.SQLExceptionprotected final java.sql.Connection getNewCurrentConnectionHandle()
protected void closeCurrentConnectionHandle()
throws java.sql.SQLException
java.sql.SQLException
protected void resetRealConnection()
throws java.sql.SQLException
java.sql.SQLException
public void close()
throws java.sql.SQLException
close in interface javax.sql.PooledConnectionjava.sql.SQLException - - if a database-access error occurs.public final void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener in interface javax.sql.PooledConnectionpublic final void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener in interface javax.sql.PooledConnection
public java.sql.Connection getRealConnection()
throws java.sql.SQLException
BrokeredConnectionControl
getRealConnection in interface BrokeredConnectionControljava.sql.SQLExceptionpublic void notifyError(java.sql.SQLException exception)
public void notifyClose()
protected final void checkActive()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void notifyException(java.sql.SQLException sqle)
notifyException in interface BrokeredConnectionControl
public void checkAutoCommit(boolean autoCommit)
throws java.sql.SQLException
checkAutoCommit in interface BrokeredConnectionControljava.sql.SQLException
public void checkHoldCursors(int holdability)
throws java.sql.SQLException
checkHoldCursors in interface BrokeredConnectionControljava.sql.SQLException
public void checkSavepoint()
throws java.sql.SQLException
checkSavepoint in interface BrokeredConnectionControljava.sql.SQLException
public void checkRollback()
throws java.sql.SQLException
checkRollback in interface BrokeredConnectionControljava.sql.SQLException
public void checkCommit()
throws java.sql.SQLException
checkCommit in interface BrokeredConnectionControljava.sql.SQLException
public boolean closingConnection()
throws java.sql.SQLException
closingConnection in interface BrokeredConnectionControljava.sql.SQLException
public java.sql.Statement wrapStatement(java.sql.Statement s)
throws java.sql.SQLException
wrapStatement in interface BrokeredConnectionControljava.sql.SQLException
public java.sql.PreparedStatement wrapStatement(java.sql.PreparedStatement ps,
java.lang.String sql,
java.lang.Object generatedKeys)
throws java.sql.SQLException
wrapStatement in interface BrokeredConnectionControljava.sql.SQLException
public java.sql.CallableStatement wrapStatement(java.sql.CallableStatement cs,
java.lang.String sql)
throws java.sql.SQLException
wrapStatement in interface BrokeredConnectionControljava.sql.SQLExceptionpublic void setDrdaID(java.lang.String drdaID)
setDrdaID in interface BrokeredConnectionControldrdaID - drda connection identifier
public void setPrepareIsolation(int level)
throws java.sql.SQLException
setPrepareIsolation in interface BrokeredConnectionControllevel - internal isolation level
java.sql.SQLExceptionBrokeredConnection.setPrepareIsolation(int)
public int getPrepareIsolation()
throws java.sql.SQLException
getPrepareIsolation in interface BrokeredConnectionControljava.sql.SQLExceptionpublic java.lang.String toString()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||