这个和hibernate没有关系啊,主要还是看你采用的连接池的配置方式,不同连接池包的配置方式是不同的,比如c3p0或dbcp或proxool等,每个连接池都有无限连接的方法,就看你用哪个了,去参考一下每个连接池的配置文件就知道了。
解决方案 »
- struct2学习:回到网站根目录
- ejb3.0 webservice 获得IP?
- 求jforum-2.1.8 设置版主的源代码
- hibernate对象查询如果去掉空格比较?
- org.springframework.web.filter.CharacterEncodingFilter不起作用
- 技术面试题大汇总
- 谁能给我整一个关于struts的实际例子??????????谢谢
- 远程客户如果一直维持引用,有状态的会话bean在怎样的情况下会超时(或被回收)?
- java ee 页面的模糊查询
- 大牛们帮忙帮看下为什么AJAX不进success,也不进error
- eclipse中使用官方hibernate Tools出现的问题
- 望大家帮助我这个新手
这个和hibernate没有关系啊,主要还是看你采用的连接池的配置方式,不同连接池包的配置方式是不同的,比如c3p0或dbcp或proxool等,每个连接池都有无限连接的方法,就看你用哪个了,去参考一下每个连接池的配置文件就知道了。
-------------------------------
关注,前几天还想就这个问题,问呢!
增加配置项如下:
#Defines how many times c3p0 will try to acquire a new Connection from the database
#before giving up.
#If this value is less than or equal to zero, c3p0 will keep trying to fetch a Connection
#indefinitely.
acquireRetryAttempts=60#Milliseconds, time c3p0 will wait between acquire attempts.
acquireRetryDelay=60000#If true, a pooled DataSource will declare itself broken and be permanently closed if a
#Connection cannot be obtained from the database after making acquireRetryAttempts to
#acquire one.
#If false, failure to obtain a Connection will cause all Threads waiting for the pool to
# acquire
#a Connection to throw an Exception, but the DataSource will remain valid, and will
#attempt to
#acquire again following a call to getConnection().
breakAfterAcquireFailure=false