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.quartz.utils
Class PoolingConnectionProvider

    java.lang.Object
      org.quartz.utils.PoolingConnectionProvider

All Implemented Interfaces:
  ConnectionProvider

public class PoolingConnectionProvider
extends Object
implements ConnectionProvider

A `ConnectionProvider` implementation that creates it's own pool of connections.

This class uses DBCP , an Apache-Jakarta-Commons product.

Author:
  Sharada Jambula, James House, Mohammad Rezaei
See Also:
  `DBConnectionManager`, `ConnectionProvider`

Field Summary
`static String` | `DB_DRIVER`
`static String` | `DB_JNDI_DATASOURCE_URL`
`static String` | `DB_MAX_CONNECTIONS`
`static String` | `DB_PASSWORD`
`static String` | `DB_PROPS_PREFIX`
`static String` | `DB_URL`
`static String` | `DB_USER`
`static String` | `DB_VALIDATION_QUERY`

Constructor Summary
`PoolingConnectionProvider(Properties config)` Create a connection pool using the given properties.
`PoolingConnectionProvider(String dbDriver, String dbURL, String dbUser, String dbPassword, int maxConnections, String dbValidationQuery)`

Method Summary
`Connection` | `getConnection()`
`void` | `shutdown()`

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

Field Detail

### DB_PROPS_PREFIX

    public static final String DB_PROPS_PREFIX

See Also:
  Constant Field Values

### DB_JNDI_DATASOURCE_URL

    public static final String DB_JNDI_DATASOURCE_URL

See Also:
  Constant Field Values

### DB_DRIVER

    public static final String DB_DRIVER

See Also:
  Constant Field Values

### DB_URL

    public static final String DB_URL

See Also:
  Constant Field Values

### DB_USER

    public static final String DB_USER

See Also:
  Constant Field Values

### DB_PASSWORD

    public static final String DB_PASSWORD

See Also:
  Constant Field Values

### DB_MAX_CONNECTIONS

    public static final String DB_MAX_CONNECTIONS

See Also:
  Constant Field Values

### DB_VALIDATION_QUERY

    public static final String DB_VALIDATION_QUERY

See Also:
  Constant Field Values

Constructor Detail

### PoolingConnectionProvider

    public PoolingConnectionProvider(String dbDriver,
                                     String dbURL,
                                     String dbUser,
                                     String dbPassword,
                                     int maxConnections,
                                     String dbValidationQuery)
                              throws SQLException

### PoolingConnectionProvider

    public PoolingConnectionProvider(Properties config)
                              throws SQLException

  Create a connection pool using the given properties.

  The properties passed should contain either

  - JNDI DataSource URL `DB_JNDI_DATASOURCE_URL`
  or
  - `DB_DRIVER`- The database driver class name
  - `DB_URL`- The database URL
  - `DB_USER`- The database user
  - `DB_PASSWORD`- The database password
  - `DB_MAX_CONNECTIONS`- The maximum # connections in the pool

Parameters:
  `config` - configuration properties
Throws:
  `SQLException` - if an error occurs

Method Detail

### getConnection

    public Connection getConnection()
                             throws SQLException

  Specified by:
    `getConnection` in interface `ConnectionProvider`
  Returns:
    connection managed by this provider
  Throws:
    `SQLException`

### shutdown

    public void shutdown()
                  throws SQLException

  Specified by:
    `shutdown` in interface `ConnectionProvider`
  Throws:
    `SQLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD