Type: Bug Fix
Affects Version/s: None
KULRICE-14210 KualiHttpSessionListener releases wrong locks KULRICE-3654 DateTimeServiceImpl.java parse method does not check for Valid Dates KULRICE-5341 UserSession gets bound to a thread, and eDocLite documents are not establishing user session properly KULRICE-10110 Cleanup on copy methods KULRICE-6130 Document various "validate" methods on KimTypeService KULRICE-9940 Cleanup from new copy methods KULRICE-7731 Validation messages Get Warning+Info Messages does nothing or results in method POST not supported stacktrace KULRICE-7661 AdHoc Group request - isAddHocRouteWorkgroupValid() method should validate the groups permission and it is not. KULRICE-12559 Document controller is missing recall method KULRICE-12344 Issue with IdentityArchiveServiceImpl when entity does not have principal
The sessionDestroyed() method in KualiHttpSessionListener makes a call to DocumentService to get a document using a document id but there is no valid UserSession in GlobalVariables so an error is thrown.
Solution would be to simply get the UserSession from the destroyed session object passed in via the HttpSessionEvent object and set it in GlobalVariables.
Original E-mail from Chitra:
While I was implementing Session time out handling within KRA, I noticed the following.
Within the sessionDestroyed method of KualiHttpSessionListener, we are attempting to release all existing locks for a specific document available in that Session. We are basically looking for a document key in session and if present, we go on to retrieve the document and proceed to release the locks. But DocumentService's getByDocumentHeaderId also depends on UserSession being present in GlonalVariables.
When I was testing the Session timeout stuff in KRA, I found that there were two sessions being created and hence, I modified KualiCASFilter to get rid of the second session (
KULRICE-1810). After this change, I started facing
"GlobalVariables must be populated with a valid UserSession before a document can be fetched" at org.kuali.core.service.impl.DocumentServiceImpl.getByDocumentHeaderId(DocumentServiceImpl.java:483) during Session Expiration (lock cleanup code).
So, I had to extend the KualiHttpSessionListener (within KRA) and override sessionDestroyed method.
public void sessionDestroyed(HttpSessionEvent se)
With this change, things work fine.
I just wanted to know if you could take a look at this and possibly include it within KualiHttpSessionListener.