Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[provider side]support returning implicit results #43

Closed
ludvik opened this issue May 4, 2014 · 3 comments
Closed

[provider side]support returning implicit results #43

ludvik opened this issue May 4, 2014 · 3 comments
Assignees

Comments

@ludvik
Copy link

ludvik commented May 4, 2014

This is a ticket to extend DUBBO's implicit parameter mechanism described in current DUBBO documentation:
http://alibaba.github.io/dubbo-doc-static/User+Guide-zh.htm#UserGuide-zh-%E9%9A%90%E5%BC%8F%E4%BC%A0%E5%8F%82

In-short, the pattern of the above document is:
[consumer side] set attachments ----> [provider side] get attachments

this ticket is intended to extend this mechanism to:
[provider side(before return)] set attachments --> [consumer side] get attachments

provider side

public class XxxServiceImpl implements XxxService {

    public void xxx() { // 服务方法实现(service implementation)
        // ....
        // 返回之前 (before return)
        RpcContext.getContext().setAttachment("userToken", "0001"); 
    }
}

consumer side

xxxService.xxx();
String userToken = RpcContext.getContext().getAttachment("userToken"); 
@diecui1202
Copy link

diecui1202 commented May 31, 2018

Could you share us the scenario about using RpcContext attachment to return results?

@ralf0131
Copy link
Contributor

Hi, I think the scenario is described in #68

@diecui1202
Copy link

diecui1202 commented Jul 31, 2018

@ludvik This feature is provided in 2.6.3, which is on the releasing vote thread.

&READY-TO-CLOSE&

@ralf0131 ralf0131 closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants