Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.conn
Class PoolDataSource

    java.lang.Object
      org.apache.cayenne.conn.PoolDataSource

All Implemented Interfaces:
  ConnectionPoolDataSource

    public class PoolDataSource

extends Object
implements ConnectionPoolDataSource

PoolDataSource allows to generate pooled connections.

It is implemented as a wrapper around a non-pooled data source object. Delegates all method calls except for "getPooledConnection" to the underlying datasource.

Constructor Summary
`PoolDataSource(DataSource nonPooledDatasource)` Creates new PoolDataSource
`PoolDataSource(String jdbcDriver, String connectionUrl)`

Method Summary
`int` | `getLoginTimeout()`
`PrintWriter` | `getLogWriter()`
`PooledConnection` | `getPooledConnection()`
`PooledConnection` | `getPooledConnection(String user, String password)`
`void` | `setLoginTimeout(int seconds)`
`void` | `setLogWriter(PrintWriter out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PoolDataSource

    public PoolDataSource(DataSource nonPooledDatasource)

  Creates new PoolDataSource

### PoolDataSource

    public PoolDataSource(String jdbcDriver,
                          String connectionUrl)
                   throws SQLException

Throws:
  `SQLException`

Method Detail

### getLoginTimeout

    public int getLoginTimeout()
                        throws SQLException

  Specified by:
    `getLoginTimeout` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`

### setLoginTimeout

    public void setLoginTimeout(int seconds)
                         throws SQLException

  Specified by:
    `setLoginTimeout` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`

### getLogWriter

    public PrintWriter getLogWriter()
                             throws SQLException

  Specified by:
    `getLogWriter` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`

### setLogWriter

    public void setLogWriter(PrintWriter out)
                      throws SQLException

  Specified by:
    `setLogWriter` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`

### getPooledConnection

    public PooledConnection getPooledConnection()
                                         throws SQLException

  Specified by:
    `getPooledConnection` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`

### getPooledConnection

    public PooledConnection getPooledConnection(String user,
                                                String password)
                                         throws SQLException

  Specified by:
    `getPooledConnection` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.