Package com.microsoft.sqlserver.jdbc
Class SQLServerPooledConnection
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.SQLServerPooledConnection
-
- All Implemented Interfaces:
Serializable
,PooledConnection
- Direct Known Subclasses:
SQLServerXAConnection
public class SQLServerPooledConnection extends Object implements PooledConnection, Serializable
Represents a physical database connection in a connection pool. If provides methods for the connection pool manager to manage the connection pool. Applications typically do not instantiate these connections directly.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnectionEventListener(ConnectionEventListener listener)
void
addStatementEventListener(StatementEventListener listener)
void
close()
Connection
getConnection()
Returns an object handle for the physical connection that this PooledConnection object represents.void
removeConnectionEventListener(ConnectionEventListener listener)
void
removeStatementEventListener(StatementEventListener listener)
String
toString()
Provides a helper function to provide an ID string suitable for tracing.
-
-
-
Method Detail
-
toString
public String toString()
Provides a helper function to provide an ID string suitable for tracing.
-
getConnection
public Connection getConnection() throws SQLException
Returns an object handle for the physical connection that this PooledConnection object represents.- Specified by:
getConnection
in interfacePooledConnection
- Returns:
- a Connection object that is a handle to this PooledConnection object
- Throws:
SQLException
- when an error occurs
-
addConnectionEventListener
public void addConnectionEventListener(ConnectionEventListener listener)
- Specified by:
addConnectionEventListener
in interfacePooledConnection
-
close
public void close() throws SQLException
- Specified by:
close
in interfacePooledConnection
- Throws:
SQLException
-
removeConnectionEventListener
public void removeConnectionEventListener(ConnectionEventListener listener)
- Specified by:
removeConnectionEventListener
in interfacePooledConnection
-
addStatementEventListener
public void addStatementEventListener(StatementEventListener listener)
- Specified by:
addStatementEventListener
in interfacePooledConnection
-
removeStatementEventListener
public void removeStatementEventListener(StatementEventListener listener)
- Specified by:
removeStatementEventListener
in interfacePooledConnection
-
-