|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.boylesoftware.cb2.DAOConfig
DAO configuration built from a <dao-config>
element in
the blo-config.xml
file. A DAOConfig
object is
required to create any instance of DAO. Multiple DAO instances can share
the same DAO configuration object. The reason behind separating DAO
configuration from the DAO itself, is that parsing a
<dao-config>
element and bulding a DAOConfig
object out of it is a very expensive operation, so having a separate object
allows to perform it once and then quickly create DAO instances on its
basis.
The BL Manager, being initialized, creates and then keeps instances of
DAOConfig
for each configured data source. References to those
objects can be retrieved from within any BLO via its
getDAOConfig
protected method.
The DAOConfig
logs messages related to its operation under
"com.boylesoftware.cb2.DAOCFG" log channel.
Constructor Summary | |
DAOConfig(ApplicationContext appCtx,
java.lang.String dataSourceName,
org.w3c.dom.Element[] daoConfigs)
Constructs a DAO config instance from a number of <dao-config> XML elements. |
Method Summary | |
ApplicationContext |
getApplicationContext()
Gets the application context associated with this config object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DAOConfig(ApplicationContext appCtx, java.lang.String dataSourceName, org.w3c.dom.Element[] daoConfigs) throws BLException
<dao-config>
XML elements. Contents of the specified
<dao-config>
elements are combined together and
threated as one.
appCtx
- the application context.dataSourceName
- logical name of the data source, for which this
config is built. Any dataSource
attributes of the specified
<dao-config>
elements are ignored.daoConfigs
- array of parsed <dao-config>
XML
elements.
BLException
- if an error happens preventing the DAO config from
being built.Method Detail |
public ApplicationContext getApplicationContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |