org.jboss.ejb3.interceptor
Class EJB3TCCLInterceptor
java.lang.Object
org.jboss.ejb3.interceptor.EJB3TCCLInterceptor
- All Implemented Interfaces:
- org.jboss.aop.advice.Interceptor
public class EJB3TCCLInterceptor
- extends java.lang.Object
- implements org.jboss.aop.advice.Interceptor
EJB3TCCLInterceptor
Interceptor responsible for setting the correct Thread context classloader (TCCL)
during the EJB invocation. The EJBContainer's classloader is set as the
TCCL for the duration of this invocation. The TCCL is then reset to the original
classloader.
Note: The TCCL switch happens from the point when this interceptor is invoked. So
ideally, this interceptor should be the first in the chain of the AOP interceptors
during the EJB invocation
|
Method Summary |
java.lang.String |
getName()
Returns the name of the interceptor |
java.lang.Object |
invoke(org.jboss.aop.joinpoint.Invocation invocation)
Sets the TCCL to the classloader of the container so
that the invocation happens in the context of the
container's classloader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EJB3TCCLInterceptor
public EJB3TCCLInterceptor()
getName
public java.lang.String getName()
- Returns the name of the interceptor
- Specified by:
getName in interface org.jboss.aop.advice.Interceptor
- See Also:
Interceptor.getName()
invoke
public java.lang.Object invoke(org.jboss.aop.joinpoint.Invocation invocation)
throws java.lang.Throwable
- Sets the TCCL to the classloader of the container so
that the invocation happens in the context of the
container's classloader. Finally upon return resets
the TCCL to the previous classloader.
- Specified by:
invoke in interface org.jboss.aop.advice.Interceptor
- Throws:
java.lang.Throwable