I have implemented a connection pool in my 'application' scope using JSP, servlet. After 8 hours, the connection will be automatically closed. To solve this problem, I find out I can either increase the wait_timeout time or I can try to reconnection the connections after several time. However, I do not how to write a class to listener to this event. I prefer to increase the timeout in MySQL. But how should I set the parameter?
Or if anyone can tell me how I can use the listener in JSP or servlet to reconnection the pool. Thank you