| org.apache.torque.dsfactory.DataSourceFactory
All known Subclasses: org.apache.torque.dsfactory.AbstractDataSourceFactory,
DataSourceFactory | public interface DataSourceFactory (Code) | | A factory that returns a DataSource.
author: John McNally author: Thomas Fischer version: $Id: DataSourceFactory.java 473821 2006-11-11 22:37:25Z tv $ |
Method Summary | |
void | close() A hook which is called when the resources of the associated DataSource
can be released.
After close() is called, the other methods may not work any more
(e.g. | DataSource | getDataSource() | String | getSchema() This method returns the current schema for the database connection
The current schema name. | void | initialize(Configuration configuration) Initialize the factory. | void | setSchema(String schema) |
DSFACTORY_KEY | String DSFACTORY_KEY(Code) | | Key for the configuration which contains DataSourceFactories
|
FACTORY_KEY | String FACTORY_KEY(Code) | | Key for the configuration which contains the fully qualified name
of the factory implementation class
|
close | void close() throws TorqueException(Code) | | A hook which is called when the resources of the associated DataSource
can be released.
After close() is called, the other methods may not work any more
(e.g. getDataSource() might return null).
It is not guaranteed that this method does anything. For example,
we do not want to close connections retrieved via JNDI, so the
JndiDataSouurceFactory does not close these connections
throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException. |
getSchema | String getSchema()(Code) | | This method returns the current schema for the database connection
The current schema name. Null means, no schema has been set. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException. |
initialize | void initialize(Configuration configuration) throws TorqueException(Code) | | Initialize the factory.
Parameters: configuration - where to load the factory settings from throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException. |
setSchema | void setSchema(String schema)(Code) | | Sets the current schema for the database connection
Parameters: schema - The current schema name |
|
|