|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.dsfactory.AbstractDataSourceFactory
A class that contains common functionality of the factories in this package.
Field Summary | |
static java.lang.String |
CONNECTION_KEY
"connection" Key for the configuration |
static java.lang.String |
DEFAULT_CONNECTION_KEY
"default.connection" Key for the configuration |
static java.lang.String |
DEFAULT_POOL_KEY
"default.pool" Key for the configuration |
static java.lang.String |
POOL_KEY
"pool" Key for the configuration |
Constructor Summary | |
AbstractDataSourceFactory()
|
Method Summary | |
protected void |
applyConfiguration(org.apache.commons.configuration.Configuration c,
java.lang.Object o)
Iterate over a Configuration subset and apply all properties to a passed object which must contain Bean setter and getter |
protected javax.sql.ConnectionPoolDataSource |
initCPDS(org.apache.commons.configuration.Configuration configuration)
Initializes the ConnectionPoolDataSource. |
protected void |
setProperty(java.lang.String property,
org.apache.commons.configuration.Configuration c,
java.lang.Object ds)
Encapsulates setting configuration properties on DataSource objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String POOL_KEY
public static final java.lang.String CONNECTION_KEY
public static final java.lang.String DEFAULT_POOL_KEY
public static final java.lang.String DEFAULT_CONNECTION_KEY
Constructor Detail |
public AbstractDataSourceFactory()
Method Detail |
protected void setProperty(java.lang.String property, org.apache.commons.configuration.Configuration c, java.lang.Object ds) throws java.lang.Exception
DataSource
objects.
property
- the property to read from the configurationc
- the configuration to read the property fromds
- the DataSource
instance to write the property to
java.lang.Exception
- if anything goes wrongprotected void applyConfiguration(org.apache.commons.configuration.Configuration c, java.lang.Object o) throws TorqueException
c
- The configuration subseto
- The object to apply the properties to
TorqueException
- if a property set failsprotected javax.sql.ConnectionPoolDataSource initCPDS(org.apache.commons.configuration.Configuration configuration) throws TorqueException
configuration
- where to read the settings from
ConnectionPoolDataSource
TorqueException
- if a property set fails
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |