老问题了。。
还是没搞明白。。
在一个
继承了HibernateDaoSupport的dao中使用了update方法。结果报了Cannot get a connection, pool error Timeout waiting for idle object 这个错误网上说是连接太少了的问题。那么我想问一下要多少个连接才合适啊。。我现在已经有了50个连接了。使用的时候是在serviceImp里面使用的 也开启了事务。。请教高手 。。
public void update(T entity) {
log.debug("begin update" + entityClass.getName() + "");
try {
this.getHibernateTemplate().update(entity);
log.debug("update" + entityClass.getName() + " success");
} catch (Exception e) {
e.printStackTrace();
log.error("update" + entityClass.getName() + " fail", e);
} }
在serviceImp中是主要这么一个业务流程下来。。for(int i=0;i<100000;i++){
AA aalist = ....;
AADao.update(aalist);
}请教是什么原因造成的呢 奇怪了。