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

## org.apache.cayenne.conf
Class DBCPDataSourceFactory

    java.lang.Object
      org.apache.cayenne.conf.DBCPDataSourceFactory

All Implemented Interfaces:
  DataSourceFactory

    public class DBCPDataSourceFactory

extends java.lang.Object
implements DataSourceFactory

A DataSourceFactory that creates a connection pool based on Apache Jakarta commons-dbcp. If you are using this factory, commons-pool and commons-dbcp jars must be present in runtime.

DBCPDataSourceFactory can be selected in the Modeler for a DataNode. DBCP pool configuration is done via a properties file that is specified in the modeler. See this wiki page for the list of supported properties.

Since:
  1.2
Author:
  Andrus Adamchik

Field Summary
`protected Configuration` | `parentConfiguration`
`static java.lang.String` | `PROPERTY_PREFIX` Deprecated. since 2.0 - this information is now private.
`static java.lang.String` | `PS_PROPERTY_PREFIX` Deprecated. since 2.0 - this information is now private.

Constructor Summary
`DBCPDataSourceFactory()`

Method Summary
`javax.sql.DataSource` | `getDataSource(java.lang.String location)` Creates and returns a {{org.apache.commons.dbcp.PoolingDataSource}} instance.
`javax.sql.DataSource` | `getDataSource(java.lang.String location, org.apache.log4j.Level logLevel)` Deprecated. since 1.2
`void` | `initializeWithParentConfiguration(Configuration parentConfiguration)` Stores parent configuration in an ivar, using it later to resolve resources.

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

Field Detail

### PROPERTY_PREFIX

    public static final java.lang.String PROPERTY_PREFIX

  Deprecated. since 2.0 - this information is now private.
  See Also:
    Constant Field Values

### PS_PROPERTY_PREFIX

    public static final java.lang.String PS_PROPERTY_PREFIX

  Deprecated. since 2.0 - this information is now private.
  See Also:
    Constant Field Values

### parentConfiguration

    protected Configuration parentConfiguration

Constructor Detail

### DBCPDataSourceFactory

    public DBCPDataSourceFactory()

Method Detail

### initializeWithParentConfiguration

    public void initializeWithParentConfiguration(Configuration parentConfiguration)

  Stores parent configuration in an ivar, using it later to resolve resources.

  Specified by:
    `initializeWithParentConfiguration` in interface `DataSourceFactory`

### getDataSource

    public javax.sql.DataSource getDataSource(java.lang.String location,
                                              org.apache.log4j.Level logLevel)
                                       throws java.lang.Exception

  Deprecated. since 1.2

  Specified by:
    `getDataSource` in interface `DataSourceFactory`
  Throws:
    `java.lang.Exception`

### getDataSource

    public javax.sql.DataSource getDataSource(java.lang.String location)
                                       throws java.lang.Exception

  Creates and returns a {{org.apache.commons.dbcp.PoolingDataSource}} instance.

  Specified by:
    `getDataSource` in interface `DataSourceFactory`
  Throws:
    `java.lang.Exception`

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

Copyright © 2001-2006 Apache.org All Rights Reserved.