Discussion

Restart Tomcat after database restore?

Dear Forum

Our PRPC system connects to 3 SQL Server databases (the PEGARULES db and two other application specific DBs). On our PRPC development system we often restore the application specific DBs. This breaks the connection from Pega to the DBs, and we have to restart the Tomcat web server to reconnect.

Does anyone know of any work arounds? It would be nice to reconnect without having to restart Tomcat.

Kind regards, Will Rayer

PS: I have checked the linked Pega articles and the forum and can't find anything relevant to this issue.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

June 15, 2010 - 5:36am

Hello Will Rayer,

I don't believe there are any work arounds - Once the connection is lost between Pega and DB, the only suggestion would be the one which you are doing right now, restarting the web server.

Cheers,
-Sudhir

July 9, 2014 - 4:23pm

Anybody have any any experience implementing this in Tomcat?

It may be possible in Tomcat 7:

Fortunately, there is an easy way to resolve this issue. You need the connection pool test each connection before it lends the connection to your application. With the JDBC Connection Pool, just like with commons-dbcp, this feature can be enabled by setting testOnBorrow to true and validationQuery to a simple test query like SELECT 1 or SELECT 1 FROM DUAL. Alternatively, the validatorClassName property can be used to indicate the full name of the class that will be used to validate connections. The class specified by validatorClassName will need to implement org.apache.tomcat.jdbc.pool.Validator, and can be used to implement any custom validation logic.

http://www.tomcatexpert.com/blog/2012/01/24/using-tomcat-7-jdbc-connection-pool-production