|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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()
This method returns the current schema for the database connection |
void |
initialize(org.apache.commons.configuration.Configuration configuration)
Initialize the factory. |
void |
setSchema(java.lang.String schema)
Sets the current schema for the database connection |
Field Detail |
public static final java.lang.String DSFACTORY_KEY
public static final java.lang.String FACTORY_KEY
Method Detail |
public javax.sql.DataSource getDataSource() throws TorqueException
DataSource
configured by the factory.
TorqueException
- if the source can't be returnedpublic void 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.public void setSchema(java.lang.String schema)
schema
- The current schema namepublic java.lang.String getSchema()
TorqueException
- Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.public 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 |