Package org.apache.torque.dsfactory

# Klasse SharedPool2DataSourceFactory

java.lang.Object
org.apache.torque.dsfactory.AbstractDataSourceFactory
org.apache.torque.dsfactory.SharedPool2DataSourceFactory

Alle implementierten Schnittstellen:
  `DataSourceFactory`

public class SharedPool2DataSourceFactory extends AbstractDataSourceFactory
A factory that looks up the DataSource using the DBCP2 pool methods.

Version:
  $Id: SharedPoolDataSourceFactory.java 1485956 2013-05-24 07:55:47Z tfischer $
Autor:
  Thomas Vandahl

- ## Feldübersicht

  ### Von Klasse geerbte Felder org.apache.torque.dsfactory.AbstractDataSourceFactory

  `CONNECTION_KEY, DEFAULT_CONNECTION_KEY, DEFAULT_POOL_KEY, DEFAULTS_KEY, POOL_KEY, USE_DURATION_TEXT_FORMAT`

  ### Von Schnittstelle geerbte Felder org.apache.torque.dsfactory.DataSourceFactory

  `DSFACTORY_KEY, FACTORY_KEY`

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `SharedPool2DataSourceFactory()`

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `void`
  `close()`
  Closes the pool associated with this factory and releases it.
  `DataSource`
  `getDataSource()`
  `void`
  `initialize(org.apache.commons.configuration2.Configuration configuration)`
  Initialize the factory.

  ### Von Klasse geerbte Methoden org.apache.torque.dsfactory.AbstractDataSourceFactory

  `applyAndRemoveGlobal, applyConfiguration, initCPDS, initJdbc2Pool, setProperty`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Konstruktordetails

  - ### SharedPool2DataSourceFactory

    public SharedPool2DataSourceFactory()

- ## Methodendetails

  - ### getDataSource

    public DataSource getDataSource()
    Angegeben von:
      `getDataSource` in Schnittstelle `DataSourceFactory`
    Angegeben von:
      `getDataSource` in Klasse `AbstractDataSourceFactory`
    Gibt zurück:
      the `DataSource` configured by the factory.
    Siehe auch:
      - `DataSourceFactory.getDataSource()`

  - ### initialize

    public void initialize(org.apache.commons.configuration2.Configuration configuration) throws TorqueException
    Beschreibung aus Klasse kopiert: `AbstractDataSourceFactory`
    Initialize the factory.
    Angegeben von:
      `initialize` in Schnittstelle `DataSourceFactory`
    Angegeben von:
      `initialize` in Klasse `AbstractDataSourceFactory`
    Parameter:
      `configuration` - where to load the factory settings from
    Löst aus:
      `TorqueException` - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.
    Siehe auch:
      - `DataSourceFactory.initialize(org.apache.commons.configuration2.Configuration)`

  - ### close

    public void close() throws TorqueException
    Closes the pool associated with this factory and releases it.
    Löst aus:
      `TorqueException` - if the pool cannot be closed properly