|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataSourceFactory
A factory that returns a DataSource.
Field Summary | |
---|---|
static java.lang.String |
DSFACTORY_KEY
Key for the configuration which contains DataSourceFactories |
static java.lang.String |
FACTORY_KEY
Key for the configuration which contains the fully qualified name of the factory implementation class |
Method Summary | |
---|---|
void |
close()
A hook which is called when the resources of the associated DataSource can be released. |
javax.sql.DataSource |
getDataSource()
|
java.lang.String |
getSchema()
Deprecated. use DatabaseInfo.getSchema() instead. Will be removed in a future version of Torque. |
void |
initialize(org.apache.commons.configuration.Configuration configuration)
Initialize the factory. |
void |
setSchema(java.lang.String schema)
Deprecated. use DatabaseInfo.setSchema() instead. Will be removed in a future version of Torque. |
Field Detail |
---|
static final java.lang.String DSFACTORY_KEY
static final java.lang.String FACTORY_KEY
Method Detail |
---|
javax.sql.DataSource getDataSource() throws TorqueException
DataSource
configured by the factory.
TorqueException
- if the source can't be returnedvoid initialize(org.apache.commons.configuration.Configuration configuration) throws TorqueException
configuration
- where to load the factory settings from
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.void setSchema(java.lang.String schema)
schema
- The current schema namejava.lang.String getSchema()
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.void close() throws TorqueException
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |