What is your recommandation about the JbpmContext object lifetime in a web application?
I was thinking to keep the same context during the web application life time and to close it only when the application is stopped.
I am working mostly with taskInstance objects.
So I noticed that the context should be saved with task instance object each time that some operations are made on it (to keep the database up to date).
Will it be better to close regurlarly the context and get a new one?
Yes closing and opening is better... (even needed to prevent all kinds of issues) and is no performance killer.