Dev Zone
          偏執狂才能生存,人生/事業的路上需要再堅持一下
          但是又怎么說得清堅持的結果,道得盡堅持的含義
          現狀:XAPool1.4有一個bug,當設置preparedStmtCacheSize=0的時候,關閉連接會拋出NullPointerException
           
          原因:StandardConnectionHandle在Close的時候調用了preparedStatementCache.cleanupAll(),沒有進行判斷;而當preparedStmtCacheSize設置為0的時候,StandardConnectionHandle在setupPreparedStatementCache中把preparedStatementCache設置為null,以下setupPreparedStatementCache是方法中的源代碼片斷:
           
           protected void setupPreparedStatementCache() {
            log.debug(
          "StandardConnectionHandle:setupPreparedStatementCache start");
            
          if (preparedStmtCacheSize == 0) {
             log.debug(
              
          "StandardConnectionHandle:setupPreparedStatementCache return with 0");
             preparedStatementCache 
          = null;
             
          return;
            }
           
          解決辦法:修改setupPreparedStatementCache,如下:
            if (preparedStmtCacheSize == 0) {
             log.debug(
              
          "StandardConnectionHandle:setupPreparedStatementCache return with 0");
          //   preparedStatementCache = null;
             preparedStatementCache = new PreparedStatementCache(0);
             
          return;
            }
          posted on 2005-05-17 22:05 dev 閱讀(252) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
           
          主站蜘蛛池模板: 旬邑县| 白河县| 鄂温| 浮梁县| 五大连池市| 沛县| 延长县| 微山县| 蓬安县| 阿尔山市| 盐边县| 彭山县| 营口市| 淮阳县| 郴州市| 噶尔县| 新兴县| 永平县| 平安县| 威远县| 应城市| 宁化县| 土默特右旗| 北川| 凭祥市| 尚志市| 合作市| 周口市| 阜平县| 米易县| 阜阳市| 什邡市| 山阴县| 易门县| 寿阳县| 惠安县| 莱芜市| 大邑县| 云南省| 泾源县| 西吉县|