Class ProcessApplicationClassloaderInterceptor<T>

  • All Implemented Interfaces:
    java.util.concurrent.Callable<T>

    public class ProcessApplicationClassloaderInterceptor<T>
    extends java.lang.Object
    implements java.util.concurrent.Callable<T>
    Wrapps the user-provided Callable and records the Thread Context Classloader after the context switch has been performed. This allows detecting if the Thread Context has been manipulated by the container after that (Usually due to cross application EJB invocations).
    Author:
    Daniel Meyer
    • Field Detail

      • delegate

        protected java.util.concurrent.Callable<T> delegate
    • Constructor Detail

      • ProcessApplicationClassloaderInterceptor

        public ProcessApplicationClassloaderInterceptor​(java.util.concurrent.Callable<T> delegate)
    • Method Detail

      • call

        public T call()
               throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<T>
        Throws:
        java.lang.Exception
      • getProcessApplicationClassLoader

        public static java.lang.ClassLoader getProcessApplicationClassLoader()