Hi,
I have setup hibernate for my project using hibernate 3.0.5 & c3p0. I am using MSSQL as the database and jtds as the database driver. The problem is that if due to any reason, the network connection to the database fails, and after that it is restored, two request seems to fail to connect to the MSSQL server with the error, connection reset by peer. After two failure, the connection resumes. I haven't given any settings for autoreconnect in the Hibernate.cfg.xml file. Does any settings for autoreconnect exists? I am using the HibernateUtil class as mentioned in the reference manual. What change should I do to make this class retry if the connection is broken.
Please correct me if I am doing anything wrong
Thanks,
Rajesh
|