ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hycel Taylor" <hyc...@gmail.com>
Subject Re: Unavailable DTD
Date Mon, 18 Sep 2006 22:39:51 GMT
No container.  We have a DaoManagerLoader a map of DaoManagers.

public class DaoManagerLoader {
  public static Map<String, DaoManager> map = new HashMap<String, DaoManager>();

  public static DaoManager getInstance(String daoXMLPath) {
    DaoManager daoManager = map.get(daoXMLPath);
    if (daoManager == null) {
      try {
        final Reader reader = Resources.getResourceAsReader(daoXMLPath);
        daoManager = DaoManagerBuilder.buildDaoManager(reader);
        map.put(daoXMLPath, daoManager);
      } catch (Exception e) {
        throw new ServiceException(e);
      }
    }

    return daoManager;
  }

Also, in each of our sql maps, we have the following:

<!DOCTYPE sqlMap
  PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
  "http://ibatis.apache.org/dtd/sql-map-2.dtd">

Mime
View raw message