工作流jbpm3.1.2导致数据库连接池满的问题
背景:XX系统实施一段时间之后,出现数据库连接池满,第一次通过修改if(con!=null && con.isClosed()){con.close();}这样的逻辑错误解决部分问题。第二次通过彻底复查代码,修改了connection、session没有释放的问题,基本上保证我们自己写的代码没有数据库连接不释放的问题。但是临近近期还是出现连接池满的问题。。。
过程:
从日志看,除了有大量工作流报错之外程序很少有异常,类似如下:<div class="quote">引用:
2009-06-12 15:44:34,187 - Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):
..............................................
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:180)
..............................................
2009-06-12 15:44:34,187 - problem closing service 'persistence'
org.jbpm.persistence.JbpmPersistenceException: couldn't flush hibernate session
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:182)
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:180)
... 54 more
页:
[1]