|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.components.datasource.DBCPDatasourceComponent
public class DBCPDatasourceComponent
DBCPDatasourceComponent
| Field Summary | |
|---|---|
protected org.apache.commons.dbcp.PoolingDataSource |
dataSource
|
| Constructor Summary | |
|---|---|
DBCPDatasourceComponent(java.lang.String user,
java.lang.String password,
java.lang.String driverName,
java.lang.String connectURI,
int maxActive,
int maxWait,
byte whenExhausted,
boolean autoCommit)
Creates a simple commons DBCP connection pool using the following parameters. |
|
| Method Summary | |
|---|---|
javax.sql.DataSource |
getDatasource()
getDatasource |
void |
start()
start |
void |
stop()
stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.commons.dbcp.PoolingDataSource dataSource
| Constructor Detail |
|---|
public DBCPDatasourceComponent(java.lang.String user,
java.lang.String password,
java.lang.String driverName,
java.lang.String connectURI,
int maxActive,
int maxWait,
byte whenExhausted,
boolean autoCommit)
If you need to bind the datasource of this component to JNDI please @see org.apache.jetspeed.components.jndi.JNDIComponent
user - User name that will be used to connect to the DBpassword - Password that will be used to connect to the DBdriverName - Fully qualified driver to be used by the connection poolconnectURI - Fully qualified URI to the DB.maxActive - Maximum active connectionmaxWait - if whenExhausted is set to GenericObjectPool.WHEN_EXHAUSTED_BLOCK
the length of time to block while waiting for a connection to become
available.whenExhausted - GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_GROW or
GenericObjectPool.WHEN_EXHAUSTED_FAIL. @see org.apache.commons.pooling.GenericObjectPool
for more information on these settingsautoCommit - Whether or not this datasource will autocommit
java.lang.ClassNotFoundException - If the driverName could not be
located within any classloaders.| Method Detail |
|---|
public javax.sql.DataSource getDatasource()
getDatasource
returns the datasource created by this component
getDatasource in interface DatasourceComponentpublic void start()
start
org.picocontainer.Startable#start()public void stop()
stop
org.picocontainer.Startable#stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||