Package com.microsoft.sqlserver.jdbc
Class SQLServerPooledConnection
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.SQLServerPooledConnection
-
- All Implemented Interfaces:
java.io.Serializable
,javax.sql.PooledConnection
- Direct Known Subclasses:
SQLServerXAConnection
public class SQLServerPooledConnection extends java.lang.Object implements javax.sql.PooledConnection, java.io.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(javax.sql.ConnectionEventListener listener)
void
addStatementEventListener(javax.sql.StatementEventListener listener)
void
close()
java.sql.Connection
getConnection()
Returns an object handle for the physical connection that this PooledConnection object represents.void
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
void
removeStatementEventListener(javax.sql.StatementEventListener listener)
java.lang.String
toString()
Provides a helper function to provide an ID string suitable for tracing.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Provides a helper function to provide an ID string suitable for tracing.- Overrides:
toString
in classjava.lang.Object
- Returns:
- traceID String
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
Returns an object handle for the physical connection that this PooledConnection object represents.- Specified by:
getConnection
in interfacejavax.sql.PooledConnection
- Returns:
- a Connection object that is a handle to this PooledConnection object
- Throws:
java.sql.SQLException
- when an error occurs
-
addConnectionEventListener
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
- Specified by:
addConnectionEventListener
in interfacejavax.sql.PooledConnection
-
close
public void close() throws java.sql.SQLException
- Specified by:
close
in interfacejavax.sql.PooledConnection
- Throws:
java.sql.SQLException
-
removeConnectionEventListener
public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
- Specified by:
removeConnectionEventListener
in interfacejavax.sql.PooledConnection
-
addStatementEventListener
public void addStatementEventListener(javax.sql.StatementEventListener listener)
- Specified by:
addStatementEventListener
in interfacejavax.sql.PooledConnection
-
removeStatementEventListener
public void removeStatementEventListener(javax.sql.StatementEventListener listener)
- Specified by:
removeStatementEventListener
in interfacejavax.sql.PooledConnection
-
-