| java.lang.Object org.apache.jetspeed.components.datasource.DBCPDatasourceComponent
All known Subclasses: org.apache.jetspeed.components.datasource.BoundDBCPDatasourceComponent,
DBCPDatasourceComponent | public class DBCPDatasourceComponent implements DatasourceComponent(Code) | |
DBCPDatasourceComponent
version: $ $ |
Field Summary | |
protected PoolingDataSource | dataSource |
Constructor Summary | |
public | DBCPDatasourceComponent(String user, String password, String driverName, String connectURI, int maxActive, int maxWait, byte whenExhausted, boolean autoCommit) Creates a simple commons DBCP connection pool using the following
parameters.
If you need to bind the datasource of this component to
JNDI please @see org.apache.jetspeed.components.jndi.JNDIComponent
Parameters: user - User name that will be used to connect to the DB Parameters: password - Password that will be used to connect to the DB Parameters: driverName - Fully qualified driver to be used by the connection pool Parameters: connectURI - Fully qualified URI to the DB. Parameters: maxActive - Maximum active connection Parameters: maxWait - if whenExhausted is set to GenericObjectPool.WHEN_EXHAUSTED_BLOCKthe length of time to block while waiting for a connection to become available. Parameters: whenExhausted - GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_GROW orGenericObjectPool.WHEN_EXHAUSTED_FAIL. |
dataSource | protected PoolingDataSource dataSource(Code) | | |
DBCPDatasourceComponent | public DBCPDatasourceComponent(String user, String password, String driverName, String connectURI, int maxActive, int maxWait, byte whenExhausted, boolean autoCommit)(Code) | | Creates a simple commons DBCP connection pool using the following
parameters.
If you need to bind the datasource of this component to
JNDI please @see org.apache.jetspeed.components.jndi.JNDIComponent
Parameters: user - User name that will be used to connect to the DB Parameters: password - Password that will be used to connect to the DB Parameters: driverName - Fully qualified driver to be used by the connection pool Parameters: connectURI - Fully qualified URI to the DB. Parameters: maxActive - Maximum active connection Parameters: maxWait - if whenExhausted is set to GenericObjectPool.WHEN_EXHAUSTED_BLOCKthe length of time to block while waiting for a connection to become available. Parameters: whenExhausted - GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_GROW orGenericObjectPool.WHEN_EXHAUSTED_FAIL. @see org.apache.commons.pooling.GenericObjectPoolfor more information on these settings Parameters: autoCommit - Whether or not this datasource will autocommit throws: ClassNotFoundException - If the driverName could not belocated within any classloaders. |
getDatasource | public DataSource getDatasource()(Code) | |
getDatasource
returns the datasource created by this component
|
start | public void start()(Code) | |
start
See Also: org.picocontainer.Startable.start |
stop | public void stop()(Code) | |
stop
See Also: org.picocontainer.Startable.stop |
|
|