hibernate validationQuery.. proper way to use it
Posted
by cometta
on Stack Overflow
See other posts from Stack Overflow
or by cometta
Published on 2010-05-20T03:03:52Z
Indexed on
2010/05/20
3:10 UTC
Read the original article
Hit count: 874
sometime the connection from application to database will drop and i get SQLState: 08006 error Code: 17002. Below is my configuration for database pooling
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.use_sql_comments">true</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">true</prop> <!-- true ==start up slower, but performacen on runtime good-->
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.c3p0.min_size">5</prop>
<prop key="hibernate.c3p0.max_size">20</prop>
<prop key="hibernate.c3p0.timeout">1800</prop>
<prop key="hibernate.c3p0.max_statements">100</prop> <!-- c3p0's PreparedStatement cache. Zero means statement caching is turned off. -->
Can anyone advise, should i use validationQuery, onBorrow.. and why need to use it? what other properties should i use to enhance stability of the connection from my application to oracle10g?
© Stack Overflow or respective owner