|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mysql.jdbc.jdbc2.optional.MysqlPooledConnection
public class MysqlPooledConnection
This class is used to wrap and return a physical connection within a logical handle. It also registers and notifies ConnectionEventListeners of any ConnectionEvents
PooledConnection,
org.gjt.mm.mysql.jdbc2.optional.LogicalHandle| Field Summary | |
|---|---|
static int |
CONNECTION_CLOSED_EVENT
The flag for a connection being closed. |
static int |
CONNECTION_ERROR_EVENT
The flag for an exception being thrown. |
| Constructor Summary | |
|---|---|
MysqlPooledConnection(Connection connection)
Construct a new MysqlPooledConnection and set instance variables |
|
| Method Summary | |
|---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener connectioneventlistener)
Adds ConnectionEventListeners to a hash table to be used for notification of ConnectionEvents |
void |
addStatementEventListener(javax.sql.StatementEventListener listener)
|
protected void |
callConnectionEventListeners(int eventType,
java.sql.SQLException sqlException)
Notifies all registered ConnectionEventListeners of ConnectionEvents. |
void |
close()
Invoked by the container (not the client), and should close the physical connection. |
java.sql.Connection |
getConnection()
Invoked by the container. |
protected java.sql.Connection |
getConnection(boolean resetServerState,
boolean forXa)
|
protected static MysqlPooledConnection |
getInstance(Connection connection)
|
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener connectioneventlistener)
Removes ConnectionEventListeners from hash table used for notification of ConnectionEvents |
void |
removeStatementEventListener(javax.sql.StatementEventListener listener)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CONNECTION_ERROR_EVENT
public static final int CONNECTION_CLOSED_EVENT
| Constructor Detail |
|---|
public MysqlPooledConnection(Connection connection)
connection - physical connection to db| Method Detail |
|---|
protected static MysqlPooledConnection getInstance(Connection connection)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void addConnectionEventListener(javax.sql.ConnectionEventListener connectioneventlistener)
addConnectionEventListener in interface javax.sql.PooledConnectionconnectioneventlistener - listener to be notified with ConnectionEventspublic void removeConnectionEventListener(javax.sql.ConnectionEventListener connectioneventlistener)
removeConnectionEventListener in interface javax.sql.PooledConnectionconnectioneventlistener - listener to be removed
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectionjava.sql.SQLExceptionjava.sql.DataSource#getConnection()
protected java.sql.Connection getConnection(boolean resetServerState,
boolean forXa)
throws java.sql.SQLException
java.sql.SQLException
public void close()
throws java.sql.SQLException
close in interface javax.sql.PooledConnectionjava.sql.SQLExceptionjava.sql.DataSource#close()
protected void callConnectionEventListeners(int eventType,
java.sql.SQLException sqlException)
eventType - value indicating whether connectionClosed or
connectionErrorOccurred calledsqlException - the exception being thrownpublic void addStatementEventListener(javax.sql.StatementEventListener listener)
addStatementEventListener in interface javax.sql.PooledConnectionpublic void removeStatementEventListener(javax.sql.StatementEventListener listener)
removeStatementEventListener in interface javax.sql.PooledConnection
|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||