O'Reilly logo

Database Programming with JDBC & Java, Second Edition by George Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ConnectionPoolDataSource

Synopsis

Interface Name: javax.sql.ConnectionPoolDataSource

Superclass: None

Immediate Subclasses: None

Interfaces Implemented: None

Availability: New as of JDK 1.2

Description

Implementors of this interface act as factories for providing PooledConnection instances. As with the DataSource interface, this class is designed to be registered with a JNDI directory service for applications to look up by name.

Class Summary

public interface ConnectionPoolDataSource {
    int getLoginTimeout( ) throws java.sql.SQLException;
    java.io.PrintWriter getLogWriter( ) 
      throws java.sql.SQLException;
    PooledConnection getPooledConnection( ) 
      throws java.sql.SQLException;
    PooledConnection getPooledConnection(String uid, String pw)
      throws java.sql.SQLException;
    void setLoginTimeout(int sec) 
      throws java.sql.SQLException;
    void setLogWriter(java.io.PrintWriter lw) 
      throws java.sql.SQLException;
}

Object Methods

getLoginTimeout( ) and setLoginTimeout( )

public int getLoginTimeout( ) throws java.sql.SQLException;
public void setLoginTimeout(int sec) 
  throws java.sql.SQLException;
Description

This method gets and sets the interval that the system waits to establish a connection before giving up. This value is an interval in seconds. A value of zero directs the data source to depend on the default timeout for the underlying system.

getLogWriter( )and setLogWriter( )

public java.io.PrintWriter getLogWriter( ) throws java.sql.SQLException; public void setLogWriter(java.io.PrintWriter pw) throws java.sql.SQLException; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required