Hibernate version:
2.1.6
Hi friends,
Well, I have the follow problem with my opensource project (
javaBB ).
My server have a limit for clear idle's connections in mySQL (1 hour for execute the clear), and my connection at connection pool stay idle another some seconds of execute my sql's (2 seconds I think).
I know that these idle connection stay here because my "min-connection/max-connection" in my connection pool, but if my application stay stop for 2 hours and mysql clear these connections? Sux :(
I try test this "killing" via MySQL Administrator the open connections and the result is catastrophic!!
Code:
ERROR [http-8080-Processor25] (JDBCExceptionReporter.java:46) - Communication link failure: java.net.SocketException
ERROR [http-8080-Processor25] (JDBCExceptionReporter.java:46) - Communication link failure: java.net.SocketException
ERROR [http-8080-Processor25] (JDBCException.java:38) - Could not execute query
java.sql.SQLException: Communication link failure: java.net.SocketException
I stay using DBCP (dbcp is good for work with hibernate?).
Code:
<property name="hibernate.dbcp.maxActive">30</property>
<property name="hibernate.dbcp.whenExhaustedAction">2</property>
<property name="hibernate.dbcp.maxWait">30</property>
<property name="hibernate.dbcp.maxIdle">10</property>
<property name="hibernate.dbcp.removeAbandoned">true</property>
<property name="hibernate.dbcp.removeAbandonedTimeout">29</property>
<property name="hibernate.dbcp.logAbandoned">true</property>
Well, these configurations in my xml at dbcp are only tests, why I have testing a lot all's configurations possible :(
My
HibernateSessionFactory and my
HibernateDAO
Thanks for any help!
Cya!