ibatis中maxSessions配置项的位置

最大Session 数。即当前最大允许的并发
SqlMapClient数。
maxSessions设定必须介于
maxTransactions和maxRequests之间,即
maxTransactions<maxSessions=<

例子:

 

< sqlMapConfig >
  
< settings
    
cacheModelsEnabled ="true"
    enhancementEnabled
="true"
    lazyLoadingEnabled
="true"
    maxRequests
="32"
    maxSessions
="10"
    maxTransactions
="5"
    useStatementNamespaces
="false"
  
/>
  
  
< transactionManager  type ="JDBC"   >
    
< dataSource  type ="SIMPLE" >
      
< property  name ="JDBC.Driver"  value ="com.mysql.jdbc.Driver" />
      
< property  name ="JDBC.ConnectionURL"  value ="jdbc:mysql://localhost:3306/ibatis" />
      
< property  name ="JDBC.Username"  value ="root" />
      
< property  name ="JDBC.Password"  value ="1234" />  
      
< 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 ACCOUNT" />
      
< property  name ="Pool.PingEnabled"  value ="false" />
      
< property  name ="Pool.PingConnectionsOlderThan"  value ="1" />
      
< property  name ="Pool.PingConnectionsNotUsedFor"  value ="1" />
    
</ dataSource >
  
</ transactionManager >
  


  
< sqlMap  resource ="user.xml"   />
</ sqlMapConfig >

你可能感兴趣的:(mysql,jdbc,session,ibatis)