|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.torque.dsfactory.AbstractDataSourceFactory
org.apache.torque.dsfactory.JndiDataSourceFactory
A factory that looks up the DataSource from JNDI. It is also able to deploy the DataSource based on properties found in the configuration. This factory tries to avoid excessive context lookups to improve speed. The time between two lookups can be configured. The default is 0 (no cache).
| Field Summary |
| Fields inherited from class org.apache.torque.dsfactory.AbstractDataSourceFactory |
CONNECTION_KEY, DEFAULT_CONNECTION_KEY, DEFAULT_POOL_KEY, POOL_KEY |
| Constructor Summary | |
JndiDataSourceFactory()
|
|
| Method Summary | |
javax.sql.DataSource |
getDataSource()
|
void |
initialize(org.apache.commons.configuration.Configuration configuration)
Initialize the factory. |
| Methods inherited from class org.apache.torque.dsfactory.AbstractDataSourceFactory |
applyConfiguration, initCPDS, setProperty |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JndiDataSourceFactory()
| Method Detail |
public javax.sql.DataSource getDataSource()
throws TorqueException
getDataSource in interface DataSourceFactoryDataSource configured by the factory.
TorqueException - if the source can't be returnedDataSourceFactory.getDataSource()
public void initialize(org.apache.commons.configuration.Configuration configuration)
throws TorqueException
DataSourceFactory
initialize in interface DataSourceFactoryconfiguration - where to load the factory settings from
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.DataSourceFactory.initialize(org.apache.commons.configuration.Configuration)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||