在SAE上使用Java开发应用,使用hibernate链接mysql数据库时,第一次回连接失败,再次刷新就会链接成功,过10几秒在点链接,又会报链接失败错误。
Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin transaction failed:
用的是DBCP,官方文档说 MySQL服务在拿到连接10秒内未做操作将会自动丢失,但是不知道DBCP该怎么配置才好?