database session closed before script steps finished
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Goobi.Production |
Triaged
|
High
|
Unassigned | ||
1.8 |
Triaged
|
High
|
Unassigned |
Bug Description
Automatic steps crash if they access the database when the runtime of external scripts exceeds the overall JSP session lifetime.
When executing external scripts from a work-flow step, each script execution is handled by an individual thread. Unfortunately, the database session is bound to the Tomcat thread used to handle a user request. A database session is kept open until the response has been generated and is then forcefully disconnected (by a HibernateSessio
If the step involves the execution of external scripts the overall runtime might exceed the lifetime of the Tomcat web request initiated session. After the web session has been completed, the hibernate session is disconnected and thus, doesn't allow for writing database operations anymore.
Fixing this incorporates major changes to Hibernate usage across the whole project. Therefore, fixing is postponed until intranda has finished the code merge.