我目前有一个具有以下数据库连接配置的应用程序:
properties.put("javax.persistence.jdbc.driver", driver);
properties.put("javax.persistence.jdbc.url", url);
properties.put("javax.persistence.jdbc.user", user);
properties.put("javax.persistence.jdbc.password", password);
properties.put("eclipselink.cache.shared.default", "false");
properties.put("eclipselink.query-results-cache", "false");
properties.put("eclipselink.refresh", "true");
但是,由于8小时超时,MySql日志文件显示以下警告:
170509 9:40:10 [Warning] Aborted connection 692199 to db: 'databaseName' user: 'userName' host: 'host' (Got an error reading communication packets)
有没有人遇到过同样的例外?我希望EclipseLink能够自动更新连接,目的是仅记录真正相关的警告和错误。