public Object invoke(Method method, Object... args) throws Exception { Object value = null; try { preInvokeCapHomeSkeleton(); value = method.invoke(this.servantImpl, fixParamValueType(method, args)); } finally { if (!ContextManager.getContext().response().isAsyncMode()) { postInvokeCapHomeSkeleton(); } } return value; }
Context<?, ?> context = ContextManager.registerContext(request, response); context.setAttribute(Context.INTERNAL_START_TIME, startTime); context.setAttribute(Context.INTERNAL_CLIENT_IP, session.getRemoteIp()); Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = context.getAttribute(AsyncContext.PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE); if (aContext != null) aContext.writeException(cause); Thread.currentThread().setContextClassLoader(oldClassLoader); ContextManager.releaseContext(); if (!response.isAsyncMode()) { printServiceFlowLog(flowLogger, request, response.getRet(), (System.currentTimeMillis() - startTime), remark);
Context<?, ?> context = ContextManager.registerContext(request, response); context.setAttribute(Context.INTERNAL_START_TIME, startTime); context.setAttribute(Context.INTERNAL_CLIENT_IP, session.getRemoteIp()); Thread.currentThread().setContextClassLoader(oldClassLoader); ContextManager.releaseContext(); OmServiceMngr.getInstance().reportWaitingTimeProperty(waitingTime);
Context<?, ?> context = ContextManager.registerContext(request, response); context.setAttribute(Context.INTERNAL_START_TIME, startTime); context.setAttribute(Context.INTERNAL_CLIENT_IP, session.getRemoteIp()); Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = context.getAttribute(AsyncContext.PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE); if (aContext != null) aContext.writeException(cause); Thread.currentThread().setContextClassLoader(oldClassLoader); ContextManager.releaseContext(); if (!response.isAsyncMode()) { printServiceFlowLog(flowLogger, request, response.getRet(), (System.currentTimeMillis() - startTime), remark);
Context<?, ?> context = ContextManager.registerContext(request, response); context.setAttribute(Context.INTERNAL_START_TIME, startTime); context.setAttribute(Context.INTERNAL_CLIENT_IP, session.getRemoteIp()); Thread.currentThread().setContextClassLoader(oldClassLoader); ContextManager.releaseContext(); OmServiceMngr.getInstance().reportWaitingTimeProperty(waitingTime);
public static AsyncContext startAsync() throws IOException { Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = new AsyncContext(context); context.response().asyncCallStart(); context.setAttribute(PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE, aContext); return aContext; }
public Object invoke(Method method, Object... args) throws Exception { Object value = null; try { preInvokeCapHomeSkeleton(); value = method.invoke(this.servantImpl, fixParamValueType(method, args)); } finally { if (!ContextManager.getContext().response().isAsyncMode()) { postInvokeCapHomeSkeleton(); } } return value; }
public static AsyncContext startAsync() throws IOException { Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = new AsyncContext(context); context.response().asyncCallStart(); context.setAttribute(PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE, aContext); return aContext; }