报错:
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: We are already in the process of making 11 connections and the number of simultaneous builds has been throttled to 10
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)
at com.sun.proxy.$Proxy23.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:194)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:114)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at com.sun.proxy.$Proxy28.selectByExample(Unknown Source)
at cn.com.ultrapower.cooperation.province.service.imp.TonglinkClientServiceImp.batchSendMsgAndData(TonglinkCli
解决方法:
在sping配置文件上加上 <property name="simultaneousBuildThrottle" value="20" />,不加时默认是10
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver" value="oracle.jdbc.driver.OracleDriver" />
<property name="driverUrl" value="jdbc:oracle:thin:@192.168.101.230:1521:ultra" />
<property name="user" value="bps" />
<property name="password" value="bps" />
<property name="alias" value="DSDBPool" />
<property name="houseKeepingTestSql" value="select 1" />
<property name="maximumConnectionCount" value="100" />
<property name="minimumConnectionCount" value="10" />
<property name="delegateProperties" value="characterEncoding=UTF-8" />
<property name="maximumActiveTime" value="300000000" />
<property name="simultaneousBuildThrottle" value="20" />
</bean>