[jboss-user] [JBoss jBPM] - Re: Action not executing in timer

kukeltje do-not-reply at jboss.com
Sun Oct 12 20:58:40 EDT 2008


anonymous wrote : By adding a context.close() call before I go to sleep
???  You go to sleep? like in a thread? Wrong usage. 

anonymous wrote : Is this a bug or an accepted workaround? 
Neither, it is how you *should* do things.

anonymous wrote : I will now have to reopen it again to lookup a process definition or other such tasks.
Correct.. but in normal cases you do not keep it open and a process goes in a waitstate. You only open it again if e.g. an external system or person acts on something. 

anonymous wrote : but that strategy falls apart when there are other threads of execution (ala JobExecutor, custom web service, etc.) that is needing to update the database.
  | 
In most cases there only is one real thread of execution. Sure, you can have parallel things in forks, but they seldom act on the same thing at the same time. There are some things being looked into regarding locks/transactions and a join (see the jira)

anonymous wrote : In fact, the main thread only issues one commit when the process definition is inserted into the database at startup. 

Show us your unittest... might be 'wrong' usage in there

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181725#4181725

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181725



More information about the jboss-user mailing list