aspose file tools*
The moose likes Tomcat and the fly likes Connection Pool configuration: Tomcat jndi, SSL and MySQLNonTransientConnectionException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Connection Pool configuration: Tomcat jndi, SSL and MySQLNonTransientConnectionException" Watch "Connection Pool configuration: Tomcat jndi, SSL and MySQLNonTransientConnectionException" New topic
Author

Connection Pool configuration: Tomcat jndi, SSL and MySQLNonTransientConnectionException

Fran Cricket
Greenhorn

Joined: Nov 03, 2012
Posts: 9
I'm using the tomcat connection pool via JNDI resources.

To avoid that the connection is lost after a long inactivity (more of 8 hours, that is the default value of MySQL variable wait_timeout), I have put validationQuery and testOnBorrow in the context.xml.

My context.xml is:


It works, but if a I use a SSL connection, it doesn't work anymore.

I obtain:


I wouldn't to use autoreconnect=true, 'cause it is not recommended by MySQL team itself

What could be the issue? Why this difference between SSL and no-SSL?
Fran Cricket
Greenhorn

Joined: Nov 03, 2012
Posts: 9
It seems to work by putting ssl=true in the query string of the connection to db:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pool configuration: Tomcat jndi, SSL and MySQLNonTransientConnectionException