The DaoManager
instance that is built from a
dao.config
file is aware of all of the contexts
contained within the configuration file. The context basically bundles DAO
implementations together with a session handler. The
DaoManager
knows which DAOs and session handler
belong to which context. When you request a DAO instance from the
DaoManager
, the proper session handler will be
provided with it. Therefore, there is no need to access the context or
session handler directly. Your DAO knows how it works.