posts - 0,  comments - 5,  trackbacks - 0
          if (CountConstants.cArrayStackA? == ? null )
          ????????????????CountConstants.cArrayStackA?
          = ? new ?CountViewArrayStack(CountConstants.CSTACKLENGH);
          ????????????
          if (CountConstants.cArrayStackB? == ? null )
          ????????????????CountConstants.cArrayStackB?
          = ? new ?CountViewArrayStack(CountConstants.CSTACKLENGH);
          AcceptEntity?aEntity?
          = ? new ?AcceptEntity();
          CountManager?cManager?
          = ? new ?CountManager();
          ????????????
          if (CountConstants.CSTACKA)
          ????????????????cManager.countViewNum(CountConstants.cArrayStackA,aEntity);
          ????????????
          else ? if (CountConstants.CSTACKB)
          ????????????????cManager.countViewNum(CountConstants.cArrayStackB,aEntity);


          public ? class ?CountManager? {
          ????
          ????
          public ? void ?countViewNum(CountViewStack?cArrayStack,AcceptEntity?acceptEntity)
          ????
          {
          ????????
          try
          ????????
          {?
          ????????????cArrayStack.push(acceptEntity);
          ????????????
          ????????????
          // System.out.println("Stack?["+type+"]?working?……?");
          ????????}

          ????????
          catch (FullViewStackException?e)
          ????????
          {?
          ????????????
          // System.out.println?("Stack?[A]?is?Full!");
          ???????????? int ?i? = ? 0 ;
          ????????????Session?session
          = null ;
          ????????????Object[]?saveObj?
          = ? new ?Object[CountConstants.CSTACKLENGH];
          ????????????AcceptEntity?outEntity?
          = ? null ;
          ????????????
          ????????????
          if (CountConstants.CSTACKA)
          ????????????
          {
          ????????????????CountConstants.CSTACKA?
          = ? false ;
          ????????????????CountConstants.CSTACKB?
          = ? true ;?
          ????????????}

          ????????????
          else
          ????????????
          {
          ????????????????CountConstants.CSTACKB?
          = ? false ;
          ????????????????CountConstants.CSTACKA?
          = ? true ;
          ????????????}


          ????????????
          try
          ????????????
          {
          ????????????????
          while ?( ! cArrayStack.isEmpty())
          ????????????????
          {
          ????????????????????outEntity?
          = ?(AcceptEntity)cArrayStack.pop();

          ????????????????????saveObj[i]?
          = ?outEntity;
          ????????????????????i
          ++ ;
          ????????????????????outEntity?
          = ? null ;
          ????????????????}

          ????????????????session?
          = ?MailSessionManager.getMailSession();
          ????????????????EmailEntityManager.batchSave(saveObj,session);
          ????????????????
          if (session != null )?session.close();
          ????????????????
          // Hibernate.batchSave(saveObj);
          ????????????????saveObj? = ? null ;
          ????????????????
          // System.out.println("Stack?[A]?pop?end!!pop[A]:"+iTempList.length);
          ????????????????cArrayStack.push(acceptEntity);
          ????????????}

          ????????????
          catch (java.util.EmptyStackException?ex)
          ????????????
          {
          ????????????????System.out.println(
          " Error-->countViewNum() " + ex.getMessage());
          ????????????}
          finally {
          ????????????????
          if (session != null )?session.close();
          ????????????}


          ????????}
          catch (Exception?ex)
          ????????
          {
          ????????????ex.printStackTrace();
          ????????}

          ????}


          }
          posted on 2007-09-26 09:14 crazy 閱讀(186) 評(píng)論(0)  編輯  收藏 所屬分類: java

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 竹北市| 广河县| 土默特右旗| 青河县| 汉寿县| 天柱县| 雅江县| 淳安县| 海林市| 诏安县| 怀宁县| 吴桥县| 历史| 阿拉尔市| 叶城县| 宜州市| 普陀区| 同德县| 项城市| 滨州市| 余江县| 仲巴县| 临沭县| 吉隆县| 扬中市| 荥经县| 白城市| 黄冈市| 永寿县| 佛学| 青浦区| 东平县| 盈江县| 新源县| 视频| 中宁县| 页游| 赤城县| 张家口市| 土默特右旗| 黄山市|