You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/01/14 00:54:58 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1529: 除了在controller参数里声明 Invocation 外,能否提供便捷方法获取Invocation

liubao68 commented on issue #1529: 除了在controller参数里声明 Invocation 外,能否提供便捷方法获取Invocation
URL: https://github.com/apache/servicecomb-java-chassis/issues/1529#issuecomment-573946569
 
 
   1. Invocation is subclass of InvocationContext, so that you can try .ContextUtils#getInvocationContext
   2. You can add a new method:
   
   ```
   service(args)
   service(args, invocation)
   ```
   
   This is a better solution, or you assume users call service in an determined context, e.g. no thread switch and in a controller context. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services