Class JndiDataSourceFactory
java.lang.Object
org.apache.commons.jcs3.auxiliary.disk.jdbc.dsfactory.JndiDataSourceFactory
- All Implemented Interfaces:
- DataSourceFactory
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).
 Borrowed and adapted from Apache DB Torque
- 
Field SummaryFields inherited from interface org.apache.commons.jcs3.auxiliary.disk.jdbc.dsfactory.DataSourceFactoryDSFACTORY_KEY, FACTORY_KEY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Does nothing.getName()voidinitialize(JDBCDiskCacheAttributes config) Initialize the factory.
- 
Constructor Details- 
JndiDataSourceFactorypublic JndiDataSourceFactory()
 
- 
- 
Method Details- 
getName- Specified by:
- getNamein interface- DataSourceFactory
- Returns:
- the name of the factory.
 
- 
getDataSource- Specified by:
- getDataSourcein interface- DataSourceFactory
- Returns:
- the DataSourceconfigured by the factory.
- Throws:
- SQLException- if the source can't be returned
- See Also:
 
- 
initializeDescription copied from interface:DataSourceFactoryInitialize the factory.- Specified by:
- initializein interface- DataSourceFactory
- Parameters:
- config- the factory settings
- Throws:
- SQLException- Any exceptions caught during processing will be rethrown wrapped into a SQLException.
- See Also:
 
- 
closeDoes nothing. We do not want to close a dataSource retrieved from Jndi, because other applications might use it as well.- Specified by:
- closein interface- DataSourceFactory
 
 
-