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 閱讀(185) 評論(0)  編輯  收藏 所屬分類: java
          主站蜘蛛池模板: 枣庄市| 南江县| 灵丘县| 旬阳县| 班戈县| 珲春市| 昆明市| 吉安市| 宝兴县| 都江堰市| 武宁县| 慈利县| 什邡市| 南涧| 乌苏市| 遵化市| 高雄县| 科技| 花莲市| 德阳市| 博罗县| 沅陵县| 铜陵市| 班玛县| 张家界市| 涡阳县| 佛教| 泸定县| 启东市| 祁连县| 招远市| 乌拉特后旗| 容城县| 津市市| 家居| 邵东县| 轮台县| 东辽县| 会泽县| 栾城县| 柳河县|