* @return
* @throws ConfigurationException
* @throws DAOException
*/
public MetsObjectDAO getMetsObjectDAO(String col) throws ConfigurationException, DAOException {
MetsObjectDAO dao = (MetsObjectDAO)servletContext.getAttribute(Globals.DAO_KEY + "/" + col);
if (dao == null) {
CollectionConfig config = getConfig(col);
MetsObjectDAOFactory factory = MetsObjectDAOFactory.instance();
MetsObjectDAO wrappedDao = factory.createMetsObjectDAO(config.getDataSource().getDaoType());
dao = new CacheMetsObjectDAO(wrappedDao);
dao.init(config);
servletContext.setAttribute(Globals.DAO_KEY + "/" + col, dao);
}
return dao;