com.microsoft.sqlserver.jdbc

## Class SQLServerPooledConnection

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

All Implemented Interfaces:
  PooledConnection

Direct Known Subclasses:
  SQLServerXAConnection

    public class SQLServerPooledConnection
    extends Object
    implements 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(ConnectionEventListener listener)` Registers the given event listener so that it will be notified when an event occurs on this PooledConnection object.
`void` `addStatementEventListener(StatementEventListener listener)`
`void` `close()` Closes the physical connection that this PooledConnection object represents.
`Connection` `getConnection()` Creates an object handle for the physical connection that this PooledConnection object represents.
`void` `removeConnectionEventListener(ConnectionEventListener listener)` Remove a listener.
`void` `removeStatementEventListener(StatementEventListener listener)`
`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 String toString()

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

Overrides:
  `toString` in class `Object`

#### getConnection

    public Connection getConnection()
                             throws SQLException

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

Specified by:
  `getConnection` in interface `PooledConnection`
Throws:
  `SQLException`

#### addConnectionEventListener

    public void addConnectionEventListener(ConnectionEventListener listener)

Registers the given event listener so that it will be notified when an event occurs on this PooledConnection object.

Specified by:
  `addConnectionEventListener` in interface `PooledConnection`

#### close

    public void close()
               throws SQLException

Closes the physical connection that this PooledConnection object represents.

Specified by:
  `close` in interface `PooledConnection`
Throws:
  `SQLException`

#### removeConnectionEventListener

    public void removeConnectionEventListener(ConnectionEventListener listener)

Remove a listener.

Specified by:
  `removeConnectionEventListener` in interface `PooledConnection`

#### addStatementEventListener

    public void addStatementEventListener(StatementEventListener listener)

Specified by:
  `addStatementEventListener` in interface `PooledConnection`

#### removeStatementEventListener

    public void removeStatementEventListener(StatementEventListener listener)

Specified by:
  `removeStatementEventListener` in interface `PooledConnection`