java.lang.Cloneable, javax.sql.PooledConnectionpublic class VirtuosoPooledConnection
extends java.lang.Object
implements javax.sql.PooledConnection, java.lang.Cloneable
| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.String |
connURL |
|
protected int |
hashConnURL |
|
protected long |
tmClosed |
| Modifier | Constructor | Description |
|---|---|---|
protected |
VirtuosoPooledConnection(VirtuosoConnection _conn,
java.lang.String _connURL) |
|
protected |
VirtuosoPooledConnection(VirtuosoConnection _conn,
java.lang.String _connURL,
VirtuosoConnectionPoolDataSource listener) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener parm) |
Registers the given event listener so that it will be notified
when an event occurs on this
PooledConnection object. |
void |
addStatementEventListener(javax.sql.StatementEventListener listener) |
Registers a
StatementEventListener with this PooledConnection object. |
protected java.lang.Object |
clone() |
|
void |
close() |
Closes the physical connection that this
PooledConnection
object represents. |
void |
closeAll() |
Deprecated.
|
void |
finalize() |
|
java.sql.Connection |
getConnection() |
Create an object handle for this physical connection.
|
VirtuosoConnection |
getVirtuosoConnection() |
|
protected void |
init(VirtuosoConnectionPoolDataSource listener) |
|
protected boolean |
isClosed() |
|
boolean |
isConnectionLost(int timeout_sec) |
|
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener parm) |
Removes the given event listener from the list of components that
will be notified when an event occurs on this
PooledConnection object. |
void |
removeStatementEventListener(javax.sql.StatementEventListener listener) |
Removes the specified
StatementEventListener from the list of
components that will be notified when the driver detects that a
PreparedStatement has been closed or is invalid. |
protected VirtuosoPooledConnection |
reuse() |
|
protected void |
sendCloseEvent() |
|
protected void |
sendErrorEvent(java.sql.SQLException ex) |
protected java.lang.String connURL
protected int hashConnURL
protected long tmClosed
protected VirtuosoPooledConnection(VirtuosoConnection _conn, java.lang.String _connURL)
protected VirtuosoPooledConnection(VirtuosoConnection _conn, java.lang.String _connURL, VirtuosoConnectionPoolDataSource listener)
protected void init(VirtuosoConnectionPoolDataSource listener)
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected java.lang.Object clone()
clone in class java.lang.Objectprotected VirtuosoPooledConnection reuse()
public void addConnectionEventListener(javax.sql.ConnectionEventListener parm)
PooledConnection object.addConnectionEventListener in interface javax.sql.PooledConnectionparm - listener a component, usually the connection pool manager,
that has implemented the
ConnectionEventListener interface and wants to be
notified when the connection is closed or has an errorremoveConnectionEventListener(javax.sql.ConnectionEventListener)public void removeConnectionEventListener(javax.sql.ConnectionEventListener parm)
PooledConnection object.removeConnectionEventListener in interface javax.sql.PooledConnectionparm - listener a component, usually the connection pool manager,
that has implemented the
ConnectionEventListener interface and
been registered with this PooledConnection object as
a listeneraddConnectionEventListener(javax.sql.ConnectionEventListener)public void close()
throws java.sql.SQLException
PooledConnection
object represents. An application never calls this method directly;
it is called by the connection pool module, or manager.
See the interface description for more
information.
close in interface javax.sql.PooledConnectionjava.sql.SQLException - if a database access error occurs@Deprecated
public void closeAll()
throws java.sql.SQLException
java.sql.SQLException - if a database-access error occurspublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectionjava.sql.SQLException - if a database-access error occurspublic VirtuosoConnection getVirtuosoConnection() throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isConnectionLost(int timeout_sec)
public void addStatementEventListener(javax.sql.StatementEventListener listener)
StatementEventListener with this PooledConnection object. Components that
wish to be notified when PreparedStatements created by the
connection are closed or are detected to be invalid may use this method
to register a StatementEventListener with this PooledConnection object.
addStatementEventListener in interface javax.sql.PooledConnectionlistener - an component which implements the StatementEventListener
interface that is to be registered with this PooledConnection object
public void removeStatementEventListener(javax.sql.StatementEventListener listener)
StatementEventListener from the list of
components that will be notified when the driver detects that a
PreparedStatement has been closed or is invalid.
removeStatementEventListener in interface javax.sql.PooledConnectionlistener - the component which implements the
StatementEventListener interface that was previously
registered with this PooledConnection object
protected boolean isClosed()
protected void sendCloseEvent()
protected void sendErrorEvent(java.sql.SQLException ex)