iBatis的設定檔setting

來源:互聯網
上載者:User

<settings
    cacheModelsEnabled="true"
    lazyLoadingEnabled="false"
    enhancementEnabled="true"
    maxSessions="64"
    maxTransactions="8"
    maxRequests="128"
    useStatementNamespaces="false"
    classInfoCacheEnabled="true"
    errorTracingEnabled="true"
    defaultStatementTimeout=""
    statementCachingEnabled="true"
    />
<!--
 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(禁用)

 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 (啟用)
-->

FROM:http://zhangzuanqian.iteye.com/blog/430643

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.