Package com.microsoft.sqlserver.jdbc

## Class SQLServerPooledConnection

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.SQLServerPooledConnection

All Implemented Interfaces:
  `javax.sql.PooledConnection`

Direct Known Subclasses:
  `SQLServerXAConnection`

    public class SQLServerPooledConnection
    extends java.lang.Object
    implements javax.sql.PooledConnection

SQLServerPooledConnection represents a database physical 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.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addConnectionEventListener​(javax.sql.ConnectionEventListener listener)`
`void` `addStatementEventListener​(javax.sql.StatementEventListener listener)`
`void` `close()`
`java.sql.Connection` `getConnection()` Creates 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()` This is a helper function to provide an ID string suitable for tracing.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### toString

    public java.lang.String toString()

This is a helper function to provide an ID string suitable for tracing.

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  traceID String

#### getConnection

    public java.sql.Connection getConnection()
                                      throws java.sql.SQLException

Creates an object handle for the physical connection that this PooledConnection object represents.

Specified by:
  `getConnection` in interface `javax.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 interface `javax.sql.PooledConnection`

#### close

    public void close()
               throws java.sql.SQLException

Specified by:
  `close` in interface `javax.sql.PooledConnection`
Throws:
  `java.sql.SQLException`

#### removeConnectionEventListener

    public void removeConnectionEventListener​(javax.sql.ConnectionEventListener listener)

Specified by:
  `removeConnectionEventListener` in interface `javax.sql.PooledConnection`

#### addStatementEventListener

    public void addStatementEventListener​(javax.sql.StatementEventListener listener)

Specified by:
  `addStatementEventListener` in interface `javax.sql.PooledConnection`

#### removeStatementEventListener

    public void removeStatementEventListener​(javax.sql.StatementEventListener listener)

Specified by:
  `removeStatementEventListener` in interface `javax.sql.PooledConnection`