|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.conf.DBCPDataSourceFactory
public class DBCPDataSourceFactory
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.
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 |
---|
public static final java.lang.String PROPERTY_PREFIX
public static final java.lang.String PS_PROPERTY_PREFIX
protected Configuration parentConfiguration
Constructor Detail |
---|
public DBCPDataSourceFactory()
Method Detail |
---|
public void initializeWithParentConfiguration(Configuration parentConfiguration)
initializeWithParentConfiguration
in interface DataSourceFactory
public javax.sql.DataSource getDataSource(java.lang.String location, org.apache.log4j.Level logLevel) throws java.lang.Exception
getDataSource
in interface DataSourceFactory
java.lang.Exception
public javax.sql.DataSource getDataSource(java.lang.String location) throws java.lang.Exception
getDataSource
in interface DataSourceFactory
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |