This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
MySqlNonTransientConnectionException
MySQLNonTransientConnectionException
Connection polling issue with MySQLNonTransientConnectionException and Java webapp?
Tomcat serving Blank Page - shows on Refresh - why?
[MySQL] Connection reset by peer: socket write error