Vincent Thinking

          All about Vincent's work and life

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            34 隨筆 :: 0 文章 :: 183 評論 :: 0 Trackbacks
          public ? class ?ActionMapperFactory? {
          ????
          ????
          protected ? static ? final ?Log?LOG? = ?LogFactory.getLog(ActionMapperFactory. class );

          ????
          private ? static ? final ?HashMap?classMap? = ? new ?HashMap();

          ????
          public ? static ?ActionMapper?getMapper()? {
          ????????
          synchronized ?(classMap)? {
          ????????????String?clazz?
          = ?(String)?Configuration.get(WebWorkConstants.WEBWORK_MAPPER_CLASS);
          ????????????
          try ? {
          ????????????????ActionMapper?mapper?
          = ?(ActionMapper)?classMap.get(clazz);
          ????????????????
          if ?(mapper? == ? null )? {
          ????????????????????mapper?
          = ?(ActionMapper)?ObjectFactory.getObjectFactory().buildBean(clazz,? null );
          ????????????????????classMap.put(clazz,?mapper);
          ????????????????}


          ????????????????
          return ?mapper;
          ????????????}
          ? catch ?(Exception?e)? {
          ????????????????String?msg?
          = ? " Could?not?create?ActionMapper:?WebWork?will?*not*?work! " ;
          ????????????????LOG.fatal(msg,?e);
          ????????????????
          throw ? new ?RuntimeException(msg,?e);
          ????????????}

          ????????}

          ????}

          }


          明白的告訴我一下,謝謝. 覺的有點問題...
          posted on 2006-05-31 22:55 Vincent Thinking 閱讀(1749) 評論(0)  編輯  收藏 所屬分類: JAVA
          主站蜘蛛池模板: 甘孜县| 舒兰市| 潼关县| 天柱县| 泸溪县| 彭州市| 西丰县| 呼伦贝尔市| 尚志市| 奉化市| 江阴市| 苏尼特左旗| 海盐县| 赞皇县| 嘉义县| 清远市| 泗阳县| 沐川县| 洪泽县| 辛集市| 华阴市| 平度市| 米泉市| 万全县| 梁山县| 禄劝| 淮阳县| 南平市| 北海市| 台中县| 方正县| 永丰县| 临潭县| 府谷县| 垣曲县| 英吉沙县| 紫云| 兴海县| 陇南市| 定日县| 宁波市|