• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reconnect Tomcat with Microsoft SQL connection after restarting MSSQL using Hibernate/Spring

 
somenath chatterjee
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have tried by adding following way:-
1) <prop key="hibernate.autoReconnect">true</prop> where ID is hibernateProperties in applicationContext-DAO.xml
2) For changing the URL as jdbc:sqlserver://10.20.10.48:1433; autoReconnect=true.

But still not getting an exception com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
 
Jan Cumps
Bartender
Posts: 2620
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would this help you: c3p0 Configuring Connection Testing?
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!