@Override public Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException{ Assert.notNull(invocation, "RemoteInvocation must not be null"); Assert.notNull(targetObject, "Target object must not be null"); return invocation.invoke(targetObject); }
@Override public Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException{ Assert.notNull(invocation, "RemoteInvocation must not be null"); Assert.notNull(targetObject, "Target object must not be null"); return invocation.invoke(targetObject); }
return super.invoke(targetObject);
/** * Need to restore context on provider side (Though context will be overridden by Invocation's attachment * when ContextFilter gets executed, we will restore the attachment when Invocation is constructed, check more * from {@link org.apache.dubbo.rpc.proxy.InvokerInvocationHandler} */ @SuppressWarnings("unchecked") @Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
/** * Need to restore context on provider side (Though context will be overridden by Invocation's attachment * when ContextFilter gets executed, we will restore the attachment when Invocation is constructed, check more * from {@link org.apache.dubbo.rpc.proxy.InvokerInvocationHandler} */ @SuppressWarnings("unchecked") @Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
@Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); String generic = (String) getAttribute(Constants.GENERIC_KEY); if (StringUtils.isNotEmpty(generic)) { context.setAttachment(Constants.GENERIC_KEY, generic); } try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
@Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); String generic = (String) getAttribute(Constants.GENERIC_KEY); if (StringUtils.isNotEmpty(generic)) { context.setAttachment(Constants.GENERIC_KEY, generic); } try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
@Override public Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException{ Assert.notNull(invocation, "RemoteInvocation must not be null"); Assert.notNull(targetObject, "Target object must not be null"); return invocation.invoke(targetObject); }
return super.invoke(targetObject);
return super.invoke(targetObject);
/** * Need to restore context on provider side (Though context will be overridden by Invocation's attachment * when ContextFilter gets executed, we will restore the attachment when Invocation is constructed, check more * from {@link org.apache.dubbo.rpc.proxy.InvokerInvocationHandler} */ @SuppressWarnings("unchecked") @Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
/** * Need to restore context on provider side (Though context will be overridden by Invocation's attachment * when ContextFilter gets executed, we will restore the attachment when Invocation is constructed, check more * from {@link com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler} */ @SuppressWarnings("unchecked") @Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
/** * Need to restore context on provider side (Though context will be overridden by Invocation's attachment * when ContextFilter gets executed, we will restore the attachment when Invocation is constructed, check more * from {@link com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler} */ @SuppressWarnings("unchecked") @Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
/** * Need to restore context on provider side (Though context will be overridden by Invocation's attachment * when ContextFilter gets executed, we will restore the attachment when Invocation is constructed, check more * from {@link org.apache.dubbo.rpc.proxy.InvokerInvocationHandler} */ @SuppressWarnings("unchecked") @Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
return super.invoke(targetObject); } finally { SecurityContextHolder.clearContext();
@Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); String generic = (String) getAttribute(Constants.GENERIC_KEY); if (StringUtils.isNotEmpty(generic)) { context.setAttachment(Constants.GENERIC_KEY, generic); } try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
@Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); String generic = (String) getAttribute(Constants.GENERIC_KEY); if (StringUtils.isNotEmpty(generic)) { context.setAttachment(Constants.GENERIC_KEY, generic); } try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
@Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); String generic = (String) getAttribute(Constants.GENERIC_KEY); if (StringUtils.isNotEmpty(generic)) { context.setAttachment(Constants.GENERIC_KEY, generic); } try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
@Override public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { RpcContext context = RpcContext.getContext(); context.setAttachments((Map<String, String>) getAttribute(dubboAttachmentsAttrName)); String generic = (String) getAttribute(Constants.GENERIC_KEY); if (StringUtils.isNotEmpty(generic)) { context.setAttachment(Constants.GENERIC_KEY, generic); } try { return super.invoke(targetObject); } finally { context.setAttachments(null); } } }
result = invocation.invoke(targetObject); } finally { AppContext.setSecurityContext(null);