org.nuxeo.ecm.core.api.ejb
Class ReentrantCallsShieldInterceptor
java.lang.Object
org.nuxeo.ecm.core.api.ejb.ReentrantCallsShieldInterceptor
public class ReentrantCallsShieldInterceptor
- extends Object
This interceptor is used to detect reentrant calls to DocumentManagerBean.
In case of reentrancy it store the local CoreSession instance in a thread local that is must be used
by all the code using CoreSession withing the scope of the current call.
Typically, AbstractSession, EventHandlers and DocumentModelImpl may use the CoreSession while current thread
is processing a call to DocumentManagerBean.
Thanks to the threadlocal Local Session, the call can be nested without raising the ConcurrentAccessException
- Author:
- tiry
ReentrantCallsShieldInterceptor
public ReentrantCallsShieldInterceptor()
intercept
public Object intercept(InvocationContext ctx)
throws Exception
- Throws:
Exception
Copyright © 2011 Nuxeo SAS. All Rights Reserved.