请问各高手sqlMapConfig.xml中settings里这几个是啥意思 
classInfoCacheEnabled="true"
forceMultipleResultSetSupport="true"
errorTracingEnabled="true"
defaultStatementTimeout=""
statementCachingEnabled="true"
useColumnLabel="true"

解决方案 »

  1.   

     cacheModelsEnabled="true"<!--是否启用SqlMapClient上的缓存机制。建议设置为"true"-->
            enhancementenabled="true"<!--是否针对POJO启动字节码增强机制以提升getter/setter的调用效能,也为lazy loading带来性能提升。建议设置为"true"-->
            lazyLoadingEnabled="true"<!--是否启用延迟加载机制,建议设为"true"-->
            errorTracingenabled="true"<!--是否启动错误日志,在开发期间建议设为"true"以方便调试--> 
            maxRequests="32" <!--最大并发请求数(Statement并发数)--> 
            maxsessions="10" <!--最大Session数。即当前最大允许的并发SqlMapClient数。maxTransactions<maxsessions<=maxRequests--> 
            maxTransactions="5"<!--最大并发事务数--> 
            useStatementNamespaces="false" /><!--是否使用Statement命名空间。这里指映射文件中,sqlMap节点的namespace属性。当设置为true时,Statement调用需追加                                                命名空间 如:sqlMap.update("User.updateUser",user),否则直接用:sqlMap.update("updateUser",user)--> 
       <transactionManager type="JDBC"><!--事务管理器:JDBC,JTA,EXTERNAL--> 
          <dataSource type="SIMPLE"><!--SIMPLE:ibatis内置的dataSource,对应ibatis实现类为:com.ibatis.sqlmap.engine.datasource.SimpleDataSourceFactory
                                        DBCP(推荐):Apache DBCP连接池组建,对应ibatis实现类为:com.ibatis.sqlmap.engine.datasource.DbcpDataSourceFactory
                                        JNDI:J2EE容器 DataSource实现,对应ibatis实现类为:com.ibatis.sqlmap.engine.datasource.JndiDataSourceFactory
                                     --> 
      

  2.   


    ﹤?xml version="1.0" encoding="UTF-8"?﹥    ﹤!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.iBATIS.com/dtd/sql-map-config-2.dtd"﹥    ﹤sqlMapConfig﹥    ﹤properties resource=""﹥在这里将项目(工程)的所有资源文件包含进来,将相对与src路径的资源文件的路径以及文件名包含进来    ﹤settings  cacheModelsEnabled="true" 全局控制sqlMapClient的缓存    enhancementEnabled="true"全局控制运行时字节码增强,优化javabean的属性性能    lazyLoadingEnabled="true" 延迟加载    errorTracingEnabled="true"    maxRequests="32" 同时执行sql语句的最大线程数,通常大小是maxTransactions的10倍,并且总是大于maxTransactions和maxSessions的总和。减小这个值能够提高性能。   maxSessions="10"    maxTransactions="5"    useStatementNamespaces="false"  是否启动全局的sqlmap名字空间。如果启动则应用时,必须加上名字空间:queryForObject(sqlMap的名字空间.statementName)     /﹥    //这个节点是设置工程的总体性能,根据名称来设置    ﹤typeAlias alias="person" type="com.Jdnis.ibatis.model.Person" /﹥     ---﹥这个节点是将长的路径名等用短的进行替代,也就是用上面的person来代表右边的person类    ﹤transactionManager type="JDBC"﹥ type指定事务管理器:JDBC,JTA,EXTERNAL,三者的区别后面再讲到    ﹤dataSource type="SIMPLE"﹥ type值由:SIMPLE,DBCP,JNDI三者的使用后面再讲    ﹤property name="JDBC.Driver" value="com.mysql.jdbc.Driver" /﹥    ﹤property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost/person" /﹥    ﹤property name="JDBC.Username" value="root" /﹥    ﹤property name="JDBC.Password" value="root" /﹥    ﹤property name="Pool.MaximumActiveConnections" value="10" /﹥    ﹤property name="Pool.MaximumIdleConnections" value="5" /﹥    ﹤property name="Pool.MaximumCheckoutTime" value="120000" /﹥    ﹤property name="Pool.TimeToWait" value="500" /﹥    ﹤property name="Pool.PingQuery" value="select 1 from sample" /﹥    ﹤property name="Pool.PingEnabled" value="false" /﹥    ﹤property name="Pool.PingConnectionsOlderThan" value="1" /﹥    ﹤property name="Pool.PingConnectionsNotUsedFor" value="1" /﹥    ﹤/dataSource﹥    ﹤/transactionManager﹥    
      

  3.   

    ﹤?xml version="1.0" encoding="UTF-8"?﹥    ﹤!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.iBATIS.com/dtd/sql-map-config-2.dtd"﹥    ﹤sqlMapConfig﹥    ﹤properties resource=""﹥在这里将项目(工程)的所有资源文件包含进来,将相对与src路径的资源文件的路径以及文件名包含进来    ﹤settings  cacheModelsEnabled="true" 全局控制sqlMapClient的缓存    enhancementEnabled="true"全局控制运行时字节码增强,优化javabean的属性性能    lazyLoadingEnabled="true" 延迟加载    errorTracingEnabled="true"    maxRequests="32" 同时执行sql语句的最大线程数,通常大小是maxTransactions的10倍,并且总是大于maxTransactions和maxSessions的总和。减小这个值能够提高性能。   maxSessions="10"    maxTransactions="5"    useStatementNamespaces="false"  是否启动全局的sqlmap名字空间。如果启动则应用时,必须加上名字空间:queryForObject(sqlMap的名字空间.statementName)     /﹥    //这个节点是设置工程的总体性能,根据名称来设置    ﹤typeAlias alias="person" type="com.Jdnis.ibatis.model.Person" /﹥     ---﹥这个节点是将长的路径名等用短的进行替代,也就是用上面的person来代表右边的person类    ﹤transactionManager type="JDBC"﹥ type指定事务管理器:JDBC,JTA,EXTERNAL,三者的区别后面再讲到    ﹤dataSource type="SIMPLE"﹥ type值由:SIMPLE,DBCP,JNDI三者的使用后面再讲    ﹤property name="JDBC.Driver" value="com.mysql.jdbc.Driver" /﹥    ﹤property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost/person" /﹥    ﹤property name="JDBC.Username" value="root" /﹥    ﹤property name="JDBC.Password" value="root" /﹥    ﹤property name="Pool.MaximumActiveConnections" value="10" /﹥    ﹤property name="Pool.MaximumIdleConnections" value="5" /﹥    ﹤property name="Pool.MaximumCheckoutTime" value="120000" /﹥    ﹤property name="Pool.TimeToWait" value="500" /﹥    ﹤property name="Pool.PingQuery" value="select 1 from sample" /﹥    ﹤property name="Pool.PingEnabled" value="false" /﹥    ﹤property name="Pool.PingConnectionsOlderThan" value="1" /﹥    ﹤property name="Pool.PingConnectionsNotUsedFor" value="1" /﹥    ﹤/dataSource﹥    ﹤/transactionManager﹥    
      

  4.   

    classInfoCacheEnabled="true" 是否启用缓存
      

  5.   

    classInfoCacheEnabled="true"  当有很多类被ibatis重复使用的时候,会减少创建时间,提高效率
    forceMultipleResultSetSupport是否启用多结果集支持,就是多个resultset
    errorTracingEnabled是否启用错误日志
    defaultStatementTimeout数据库操作的超时时间,并不是连接超时时间,而是statement的执行超时时间
    statementCachingEnabled缓存statement,应该是当你再次调用同样的statement语句的时候(比如再次执行同样的查询),将不会重新创建,而是从缓存里读取以上设置直接采用默认即可,设置上true,基本上都是对ibatis的优化
      

  6.   

    cacheModelsEnabled="true"<!--是否启用SqlMapClient上的缓存机制。建议设置为"true"-->
      enhancementenabled="true"<!--是否针对POJO启动字节码增强机制以提升getter/setter的调用效能,也为lazy loading带来性能提升。建议设置为"true"-->
      lazyLoadingEnabled="true"<!--是否启用延迟加载机制,建议设为"true"-->
      errorTracingenabled="true"<!--是否启动错误日志,在开发期间建议设为"true"以方便调试--> 
      maxRequests="32" <!--最大并发请求数(Statement并发数)--> 
      maxsessions="10" <!--最大Session数。即当前最大允许的并发SqlMapClient数。maxTransactions<maxsessions<=maxRequests--> 
      maxTransactions="5"<!--最大并发事务数--> 
      useStatementNamespaces="false" /><!--是否使用Statement命名空间。这里指映射文件中,sqlMap节点的namespace属性。当设置为true时,Statement调用需追加 命名空间 如:sqlMap.update("User.updateUser",user),否则直接用:sqlMap.update("updateUser",user)--> 
      <transactionManager type="JDBC"><!--事务管理器:JDBC,JTA,EXTERNAL--> 
      <dataSource type="SIMPLE"><!--SIMPLE:ibatis内置的dataSource,对应ibatis实现类为:com.ibatis.sqlmap.engine.datasource.SimpleDataSourceFactory
      DBCP(推荐):Apache DBCP连接池组建,对应ibatis实现类为:com.ibatis.sqlmap.engine.datasource.DbcpDataSourceFactory
      JNDI:J2EE容器 DataSource实现,对应ibatis实现类为:com.ibatis.sqlmap.engine.datasource.JndiDataSourceFactory
      -->