JAVA—咖啡館

          ——歡迎訪問rogerfan的博客,常來《JAVA——咖啡館》坐坐,喝杯濃香的咖啡,彼此探討一下JAVA技術,交流工作經驗,分享JAVA帶來的快樂!本網站部分轉載文章,如果有版權問題請與我聯系。

          BlogJava 首頁 新隨筆 聯系 聚合 管理
            447 Posts :: 145 Stories :: 368 Comments :: 0 Trackbacks

           

           1<settings
           2    cacheModelsEnabled="true"
           3    lazyLoadingEnabled="false"
           4    enhancementEnabled="true"
           5    maxSessions="64"
           6    maxTransactions="8"
           7    maxRequests="128"
           8    useStatementNamespaces="false"
           9    classInfoCacheEnabled="true"
          10    errorTracingEnabled="true"
          11    defaultStatementTimeout=""
          12    statementCachingEnabled="true"
          13/>


          <!--
           
          maxRequests
           同時執行 SQL 語句的最大線程數。大于這個值的線程將阻塞直到另一個線程執行完成。不同的 DBMS有不同的限制值,但任何數據庫都有這些限制。通常這個值應該至少是maxTransactions(參見以下)的 10 倍,并且總是大于 maxSessions 和maxTranactions。減小這個參數值通常能提高性能。
           
           例如:maxRequests=“256”
           缺省值:512
           
           maxSessions
           同一時間內活動的最大 session 數。一個 session 可以maxSessions是代碼請求的顯式 session,也可以是當線程使用SqlMapClient 實例(即執行一條語句)自動獲得的session。它應該總是大于或等于 maxTransactions 并小于 maxRequests。減小這個參數值通常能減少內存使用。
           
           例如:maxSessions=“64”
           缺省值:128
           
           
          maxTransactions
           同時進入 SqlMapClient.startTransaction()的最大線程maxTransactions 數。大于這個值的線程將阻塞直到另一個線程退出。不同的 DBMS 有不同的限制值,但任何數據庫都有這些限制。這個參數值應該總是小于或等于maxSessions 并總是遠遠小于 maxRequests。減小這個參數值通常能提高性能。
           
           例如:maxTransactions=“16”
           缺省值:32
           
           cacheModelsEnabled
           全局性地啟用或禁用 SqlMapClient 的所有緩存cacheModelsEnabled model。調試程序時使用。
           
           例如:cacheModelsEnabled=“true”
           缺省值:true(啟用)
           
           
          lazyLoadingEnabled
           全局性地啟用或禁用SqlMapClient的所有延遲加載。lazyLoadingEnabled 調試程序時使用。
           例子:lazyLoadingEnabled=“true”
           缺省值:true(啟用)
           
           enhancementEnabled
           全局性地啟用或禁用運行時字節碼增強,以優化訪enhancementEnabled
           問Java Bean屬性的性能,同時優化延遲加載的性能。
           
           例子:enhancementEnabled=“true”
           缺省值:false(禁用)
           
           
          useStatementNamespaces
           如果啟用本屬性,必須使用全限定名來引用 mapped useStatementNamespaces
           statement。Mapped statement 的全限定名由 sql-map 的名稱和 mapped-statement 的名稱合成。例如: queryForObject("sqlMapName.statementName");
           
           例如:useStatementNamespaces=“false”
           缺省值:false(禁用)

          來源:(http://blog.sina.com.cn/s/blog_44167fca0100eiqx.html) - SqlMapConfig.xml中的setting屬性設置_leozwf_新浪博客

           defaultStatementTimeout
           此設置值必須為一個整數,作為JDBC連接超時的時間,這個值可以被任意一個映射文件的statement屬性來重新設置,
           如果沒有指明,查詢將無超時時間限制除非在映射文件中設置statement屬性值。被設置的值以秒為單位等待連接失效
            
           classInfoCacheEnabled 
           With this setting enabled, iBATIS will maintain a cache of introspected
           classes. This will lead to a significant reduction in startup time if many
           classes are reused.
           例如: classInfoCacheEnabled=“true”
           缺省值: true (啟用)
           
           statementCachingEnabled (iBATIS 2.3.0以后版本中有)
           With this setting enabled, iBATIS will maintain a local cache of
           prepared statements. This can lead to significant performance
           improvements.
           例如: statementCachingEnabled=“true”
           缺省值: true (啟用)
          -->

          來源:(http://blog.sina.com.cn/s/blog_44167fca0100eiqx.html) - SqlMapConfig.xml中的setting屬性設置_leozwf_新浪博客
          posted on 2010-07-01 11:21 rogerfan 閱讀(2071) 評論(0)  編輯  收藏 所屬分類: 【開源技術】
          主站蜘蛛池模板: 堆龙德庆县| 吴江市| 佛教| 磐石市| 玉溪市| 苗栗县| 金川县| 淮阳县| 襄城县| 阿图什市| 济宁市| 视频| 南召县| 牙克石市| 拉孜县| 沭阳县| 额尔古纳市| 云浮市| 资源县| 上思县| 石城县| 通州区| 普兰店市| 神池县| 宁强县| 弥勒县| 武义县| 东乡| 水城县| 贵溪市| 大悟县| 玛纳斯县| 镇平县| 景泰县| 本溪市| 沂源县| 收藏| 竹北市| 交口县| 文成县| 许昌县|