I use hibernate connection pool (c3p0) with oracle with configuration :
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@192.168.0.1:1521:test
hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
hibernate.jdbc.batch_size=100
hibernate.cache.use_second_level_cache=true
hibernate.show_sql=true
jdbc.username=test
jdbc.password=1
hibernate.c3p0.max_size=150
hibernate.c3p0.min_size=5
hibernate.c3p0.timeout=5000
hibernate.c3p0.max_statements=0
hibernate.c3p0.idle_test_period=300
hibernate.c3p0.acquire_increment=5
and code :
public void method1(){
Session sess=getSession();
Connection conn = sess.connection();
CallableStatement statement= conn.prepareCall("{call p_sec.set_Cont(?,?)}");
statement.setString(1,identificator1_);
statement.setString(2,identificator2_);
statement.execute();
statement.close();
}
it works fine during runtime, but after some exetution method1 (after Connection conn = sess.connection(); line ) is problem:
maybe connection destroyed, i don't know...
nothing exception .... system don't work, it needs restart.
what happend , enyone knows?
can enyone help me?
|