Package org.apache.torque.dsfactory
Klasse JndiDataSourceFactory
java.lang.Object
org.apache.torque.dsfactory.AbstractDataSourceFactory
org.apache.torque.dsfactory.JndiDataSourceFactory
- Alle implementierten Schnittstellen:
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).
- Version:
- $Id: JndiDataSourceFactory.java 1912328 2023-09-15 14:14:19Z gk $
- Autor:
- John McNally, Thomas Vandahl
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final StringKey for the configuration property which contains the class name of the datasource to be bound into jndi.static final StringKey for the configuration which contains properties for a DataSource which should be bound into jndi.static final StringKey for the configuration which contains jndi properties.static final StringKey for the configuration property which contains the jndi path.static final StringKey for the configuration property which contains the time between two jndi lookups.Von Klasse geerbte Felder org.apache.torque.dsfactory.AbstractDataSourceFactory
CONNECTION_KEY, DEFAULT_CONNECTION_KEY, DEFAULT_POOL_KEY, DEFAULTS_KEY, POOL_KEY, USE_DURATION_TEXT_FORMATVon Schnittstelle geerbte Felder org.apache.torque.dsfactory.DataSourceFactory
DSFACTORY_KEY, FACTORY_KEY -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclose()Does nothing.voidinitialize(org.apache.commons.configuration2.Configuration configuration) Initialize the factory.Von Klasse geerbte Methoden org.apache.torque.dsfactory.AbstractDataSourceFactory
applyAndRemoveGlobal, applyConfiguration, initCPDS, initJdbc2Pool, setProperty
-
Felddetails
-
JNDI_KEY
Key for the configuration which contains jndi properties.- Siehe auch:
-
PATH_KEY
Key for the configuration property which contains the jndi path.- Siehe auch:
-
TIME_BETWEEN_LOOKUPS_KEY
Key for the configuration property which contains the time between two jndi lookups.- Siehe auch:
-
DATASOURCE_KEY
Key for the configuration which contains properties for a DataSource which should be bound into jndi.- Siehe auch:
-
CLASSNAME_KEY
Key for the configuration property which contains the class name of the datasource to be bound into jndi.- Siehe auch:
-
-
Konstruktordetails
-
JndiDataSourceFactory
public JndiDataSourceFactory()
-
-
Methodendetails
-
getDataSource
- Angegeben von:
getDataSourcein SchnittstelleDataSourceFactory- Angegeben von:
getDataSourcein KlasseAbstractDataSourceFactory- Gibt zurück:
- the
DataSourceconfigured by the factory. - Löst aus:
TorqueException- if the source can't be returned- Siehe auch:
-
initialize
public void initialize(org.apache.commons.configuration2.Configuration configuration) throws TorqueException Beschreibung aus Klasse kopiert:AbstractDataSourceFactoryInitialize the factory.- Angegeben von:
initializein SchnittstelleDataSourceFactory- Angegeben von:
initializein KlasseAbstractDataSourceFactory- Parameter:
configuration- where to load the factory settings from- Löst aus:
TorqueException- Any exceptions caught during processing will be rethrown wrapped into a TorqueException.- Siehe auch:
-
close
public void close()Does nothing. We do not want to close a dataSource retrieved from Jndi, because other applications might use it as well.
-