ThreadContext oldContext = ThreadContext.enter(threadContext);
try {
Method remove = instance.bean instanceof SessionBean ? SessionBean.class.getMethod("ejbActivate") : null;
List<InterceptorData> callbackInterceptors = beanContext.getCallbackInterceptors();
InterceptorStack interceptorStack = new InterceptorStack(instance.bean, remove, Operation.ACTIVATE, callbackInterceptors, instance.interceptors);
interceptorStack.invoke();
} catch (Throwable callbackException) {
discardInstance(threadContext);
handleSystemException(threadContext.getTransactionPolicy(), callbackException, threadContext);
} finally {
ThreadContext.exit(oldContext);