Hello,
I have a method to persist process instance as follows
|
| public static synchronized void persistPI(Token token)
| throws Exception
| {
| ProcessInstance pi=token.getProcessInstance();
| JbpmSessionFactory factory = JbpmSessionFactory.getInstance();
| JbpmSession jbpmSession = factory.openJbpmSession();
| jbpmSession.beginTransaction();
| try
| {
| jbpmSession.getGraphSession().saveProcessInstance(pi);
| jbpmSession.commitTransaction();
| }
| catch (Exception e)
| {
| e.printStackTrace();
| jbpmSession.rollbackTransaction();
| throw e;
| }
| finally
| {
| jbpmSession.close();
| }
|
| }
|
I have multiple threads (one per child token) calling this method. I am getting
the following exception
| java.lang.RuntimeException: couldn't save process instance '[EMAIL
PROTECTED]'
| at org.jbpm.db.GraphSession.saveProcessInstance(GraphSession.java:209)
| at jpl.mipl.pgs.jbpm.util.Helper.persistPI(Helper.java:35)
| at jpl.mipl.pgs.jbpm.action.ForkHandler.run(ForkHandler.java:195)
| at jpl.mipl.pgs.jbpm.action.ForkHandler.run(ForkHandler.java:223)
| at java.lang.Thread.run(Thread.java:534)
| Caused by: java.util.ConcurrentModificationException
| at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:448)
| at java.util.AbstractList$Itr.next(AbstractList.java:419)
| at org.jbpm.db.LoggingSession.saveLogs(LoggingSession.java:86)
| at org.jbpm.db.GraphSession.saveProcessInstance(GraphSession.java:204)
| ... 4 more
|
Any ideas.
Thanks for your help and time
Raj
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922197#3922197
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922197
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user