Is there any way to implement a "one session per request" pattern with the spring-jbpm project?
Is there any way to implement a "one session per request" pattern with the spring-jbpm project?
What do you mean with "session" and "request"?
_________________________________
Juergen Mayrbaeurl - Solution architect
A way to keep the jbpm session open for the duration of the request. Similar to the "OpenSessionInView/Interceptor" offered for hibernate.
The current implementation of JbpmTemplate closes the session in the callback, so you get a lazy initialization exception when trying to access uninitialized fields later in the app or jsp.
One solution would be to create something similar to the HibernateInterceptor, which keeps the Hibernate session open.
Another way would be to use the TransactionProxyFactoryBean (I'm using this approach for my requests, but it assumes that you'll have inserts or updates).
Kind regards
Juergen
_________________________________
Juergen Mayrbaeurl - Solution architect
Guys, if you have any suggestions, bugs or feedback pls use this thread.
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags