title: Connection with MySql is being aborted automatically. How to configure Connector/J properly?
body: <p>I read this advice from error message:</p>
  
  <blockquote>
    <p>You should consider either expiring
    and/or testing connection validity
    before use in your application,
    increasing the server configured
    values for client timeouts, or using
    the Connector/J connection property
    'autoReconnect=true' to avoid this
    problem.</p>
  </blockquote>
  
  <p>I'm using Spring and JPA. Where should I configure Connector/J? (in <code>persistence.xml</code>, or in <code>entityManagerFactory</code> spring configuration, or in <code>dateSource</code> spring configuration, or somewhere else?) </p>