After almost 1 day hibernate says: could not execute Query
Did you read this?
http://dev.mysql.com/doc/connector/j/en/cj-faq.html#id2787172
MySQL closes connections after 8 hours of inactivity.
And even if you set the autoreconnect=true, you should be catching
SQLExceptions in your application and dealing with them.
But you also need to becareful for using autoReconnect function,
because autoReconnect will be depcreated in the future.
For detail, see the Mark Matthews comment of this.
http://bugs.mysql.com/bug.php?id=5020
没有评论:
发表评论