public static void onRequestEnd ( ) { final IRequestScope aRequestScope = getRequestScopeOrNull ( ) ; try { // Do we have something to destroy? if ( aRequestScope != null ) { _destroyRequestScope ( aRequestScope ) ; } else { // Happens after an internal redirect happened in a web-application // (e.g. for 404 page) for the original scope LOGGER . warn ( "No request scope present that could be ended!" ) ; } } finally { // Remove from ThreadLocal internalClearRequestScope ( ) ; } }
To be called after a request finished .