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

    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • toString

      public java.lang.String toString()
      Provides 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
      Returns 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