親愛的,
我使用休眠,MySQL在tomcat7測試 Struts的Web應用程序...休眠 - Tomcat的 - MySQL的問題
的8小時超時時間我總是Web應用程序崩潰後 。我在這裏和那裏改變了配置。但沒有成功。
我真的很感謝您的關注...
這裏從 hibernate.xml一些線條
property name="hibernate.bytecode.use_reflection_optimizer">false
property name="hibernate.c3p0.idle_test_period">30
property name="hibernate.c3p0.max_size">600
property name="hibernate.c3p0.max_statements">50
property name="hibernate.c3p0.min_size">5
property name="hibernate.c3p0.timeout">1800
property name="hibernate.c3p0.testConnectionOnCheckout">true
property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider
property name="hibernate.c3p0.validate">true
property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver
property name="hibernate.connection.url">jdbc:mysql://localhost:3306/stockdb?autoReconnect=true
這裏有一些線路的從我的蹤跡:
com.mchange.v2.c3p0.impl.NewPooledConnection handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
...
WARNING: [c3p0] Another error has occurred [ com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. ] which will not be reported to listeners!
...
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.
...
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014)
...
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.getMaxRows(NewProxyPreparedStatement.java:1200)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)
...
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
...
請幫幫忙!
Tomcat具有[內置數據庫連接池](http://people.apache.org/~fhanik/tomcat/jdbc-pool.html),無需渲染c3p0。 – hd1 2013-02-27 04:27:12
真棒。這對我的可憐知識來說是全新的......非常感謝你的提示。 – shan 2013-02-27 04:32:25
我會把它作爲一個答案,以及從頁面的一些配置細節,所以你可以在第二個 – hd1 2013-02-27 04:33:35