cpob,

Thanks for the very helpful reply and answer. I greatly appreciate it. Your 
answer brings up another question I have had, which is when should new 
JbpmContext be created, and when should the current context be obtained 
instead? 

The reason that this question hasn't been completely clear to me is because of 
a couple reasons:

1) It appears that any saving of data to the database (such as process instance 
state) doesn't commit until the JbpmContext is closed. This then seemed to 
suggest that a JbpmContext needed to be created and closed each time data 
needed to be saved to the database. 

2) While I have seen documentation saying that JbpmConfiguration was 
re-entrant, I have seen no such indication that JbpmContext is. I wasn't sure 
that if I was working with a JbpmContext in a servlet (or several servlets) 
whether it would be safe for all of them to be operating simultaneously on the 
current jbpmContext, rather than all using their own jbpmContext instance for 
thread safety. 

What is the recommended approach to using jbpmContexts? Can the "current" 
jbpmContext be used across multiple servlets and multiple threads without there 
being a problem, or does each one need to create its own jbpmContext, and how 
does this affect the committing of data to the database? 

Thanks for your help,

Brad

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970131
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to