Update datasource.xml

MySQL server has a default timeout period after which it terminates the idle connections. This period is 8 hours by default. Now here’s what happens. The dbcp creates a set of connections to database when the servlet container / application server starts up. If the connections are not used for the tinmeout period, the MySQL server assumes these to be dead connections and terminates them. The dbcp, however, is unaware of the fact that the connections have been terminated. So when a connection is demended from the connection-pool, these dead connections are returned and when a call is made on these dead connections – *BOOM* – you the java.net.SocketException: Broken pipe exception
    Before returning the connection from pool to the application, dbcp runs the “SELECT 1 ” query on the connection to see it it is still live. That’s the job of validationQuery.
    As for testOnBorrow, you tell dbcp to perform the check before returning the connection to application.