-
1. Re: closed JbpmContext in different order then they were cre
kukeltje Jul 16, 2008 9:14 AM (in response to tim.shaw)does using loadProcessInstanceForUpdate help? Otherwise I have no idea
-
2. Re: closed JbpmContext in different order then they were cre
tim.shaw Jul 17, 2008 4:07 AM (in response to tim.shaw)I tried the method suggested and this didn't help.
If I leave the close out of the code the program functions correctly, but I don't see an end date in the jbpm_taskinstance table so I assume that the persistence occurs on the close.
If I obtain the current context into the code before my close I can see that there are 2 contexts above mine in the stack.
I tried to close them both and this then allows the code to function but on leaving the program I then get all sorts of session closed errors.
I forgot to add that this running within an EJB session bean, so I don't know if that has any bearing on the matter.
Hope you can assist -
3. Re: closed JbpmContext in different order then they were cre
aguizar Aug 7, 2008 3:28 PM (in response to tim.shaw)Can you post the full exception stack trace? Your problem is probably related to JBPM-1130 but it is hard to tell without the trace.
-
4. Re: closed JbpmContext in different order then they were cre
kukeltje Aug 7, 2008 9:48 PM (in response to tim.shaw)if it is running within an ejb, then probably what you can try is removing te close from your code but add a save
-
5. Re: closed JbpmContext in different order then they were cre
mingdexu Feb 3, 2009 8:42 PM (in response to tim.shaw)Looking at the JBPM code (3.3.1GA), it seams that in JbpmConfiguration.java there is a singletion Stack that is used to push and pop JbpmContext. If you have multi-thread in your application (including time and async job), the JbpmContext cannot be pushed and poped in the right order.
You can take a look at JbpmConfiguration.java for methods pushJbpmContext() and popJbpmContext() for detail. -
6. Re: closed JbpmContext in different order then they were cre
kukeltje Feb 4, 2009 10:34 AM (in response to tim.shaw)the contexts are threadlocals.... Timers (the jobexecutor) has it's own context, as do the async jobs... so that has nothing to do with it afaik.... I've never had problems running jBPM with multiple parallel requests. The only situation where I got this error was when I closed and opened the context in the wrong order.... so EBKAC