ibatis 配置文件中的<settings>属性
2014-04-24 21:22
204 查看
<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 (启用)
-->
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 (启用)
-->
相关文章推荐
- <![CDATA[ ]]>在ibatis 配置文件的使用
- <<UNIX环境高级编程>>apue.h头文件的配置
- 只能用于会话状态的EnableSessionState设置为true时,无论是在配置文件或Page指令。还请确保在<configuration>\的<system.web>\的<httpModules>在应用程序配置节包括System.We
- Spring配置文件中的<beans>标签
- Spring的applicationContext配置文件中<bean>标签的属性说明
- <一>Linux文件权限与属性详解--一般权限
- 小技巧--高效编写IBATIS配置文件中的属性与字段对应映射关系
- <value>${jdbc.driverClassName}</value>解读——PropertyPlaceholderConfigurer读取配置文件
- spring配置文件中的<context:annotation-config/>
- <VirtualHost *:80>配置文件
- <IOS>开发中存储文件及配置的方式
- Spring 配置文件XML中<beans>中属性概述
- Spring配置文件详解一:<:<context:annotation-config/>与<context:component-scan base-package="com.xx
- android Manifest.xml全局配置文件中根标签中package属性及<original-package>标签注意点
- Spring 配置文件XML中<beans>中属性概述
- c3p0 xml配置文件模版 [html] view plain copy <c3p0-config> <default-config> <property name=
- <二>Linux文件权限与属性详解--ACL
- Mybatis IBatis的Mapper配置文件中使用大于号好小于号 :>和<
- <php>对文件的目录、属性、路径的操作
- <nginx + php> 修改配置文件php.ini不生效