<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