List of usage examples for org.springframework.web.context.request RequestAttributes registerDestructionCallback
void registerDestructionCallback(String name, Runnable callback, int scope);
From source file:uk.ac.ebi.intact.editor.util.HybridSessionThreadScope.java
public void registerDestructionCallback(String name, Runnable callback) { if (RequestContextHolder.getRequestAttributes() != null) { RequestAttributes attributes = RequestContextHolder.currentRequestAttributes(); attributes.registerDestructionCallback(name, callback, RequestAttributes.SCOPE_SESSION); }/*from w w w . j a va 2 s . c o m*/ }