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.conf
Class DBCPDataSourceFactory

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

All Implemented Interfaces:
  DataSourceFactory

    public class DBCPDataSourceFactory

extends 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.

Since:
  1.2

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

Constructor Summary
`DBCPDataSourceFactory()`

Method Summary
`DataSource` | `getDataSource(String location)` Creates and returns a {{org.apache.commons.dbcp.PoolingDataSource}} instance.
`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 String PROPERTY_PREFIX

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

### PS_PROPERTY_PREFIX

    public static final 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 DataSource getDataSource(String location)
                             throws Exception

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

  Specified by:
    `getDataSource` in interface `DataSourceFactory`
  Throws:
    `Exception`

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.