浏览 2441 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2010-04-20
把我一直用的proxool连接池拿出来晒晒,呵呵。 下面是hibernate配置文件的代码: <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <!-- Generated by MyEclipse Hibernate Tools. --> <hibernate-configuration> <session-factory> <property name="hibernate.proxool.pool_alias"> javawindPool2 </property> <property name="hibernate.proxool.xml"> proxoolconf.xml </property> <property name="hibernate.connection.driver_class"> org.hibernate.connection.ProxoolConnectionProvider </property> <property name="hibernate.connection.release_mode"> auto </property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.autocommit">true</property> <!--你的表映射--> <mapping resource="com/***.hbm.xml" /> </session-factory> </hibernate-configuration> 下面是proxool连接池的配置文件: <?xml version="1.0" encoding="utf-8"?> <something-else-entirely> <proxool> <alias>javawindPool2</alias> <driver-url>jdbc:mysql://localhost:3306/aa?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8</driver-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <driver-properties> <property name="user" value=""/> <property name="password" value=""/> </driver-properties> <house-keeping-sleep-time>90000</house-keeping-sleep-time> <prototype-count>1</prototype-count> <maximum-new-connections>20</maximum-new-connections> <maximum-connection-count>1000</maximum-connection-count> <minimum-connection-count>20</minimum-connection-count> <maximum-active-time>60</maximum-active-time> <simultaneous-build-throttle>500</simultaneous-build-throttle> <house-keeping-test-sql>select CURRENT_DATE</house-keeping-test-sql> </proxool> </something-else-entirely> 附件中是proxool jar,还有对应版本的hibernate jar。 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2010-04-29
最后修改:2010-04-29
<maximum-new-connections>在新版本(含0.9.1)中废弃了。
替代:<proxool.simultaneous-build-throttle> |
|
返回顶楼 | |
发表时间:2010-04-30
cnyangqi 写道 <maximum-new-connections>在新版本(含0.9.1)中废弃了。
替代:<proxool.simultaneous-build-throttle> 谢谢你 知道了! |
|
返回顶楼 | |