[ 
https://issues.apache.org/jira/browse/SCB-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888595#comment-16888595
 ] 

Willem Jiang commented on SCB-1385:
-----------------------------------

I  don't think it's a good way to expose the OmegaContext to the user, as it 
has some thread local variable, it may confuse the user.
My suggestion is we just provide a class which stores the GID and LID as 
String, then we can pass them around without worrying about the thread 
switching.

> Provide a common way to pass GID and LID
> ----------------------------------------
>
>                 Key: SCB-1385
>                 URL: https://issues.apache.org/jira/browse/SCB-1385
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Saga
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Major
>             Fix For: pack-0.5.0
>
>
> When using SNS https://spring.io/projects/spring-cloud-aws to pass the 
> invocation across the services, it's quite important for Omega to pass the 
> Global Transaction ID and Local Transaction ID across the services.
> I just spend some time to check about the message API of spring-cloud-aws, it 
> has message converters 
> (https://cloud.spring.io/spring-cloud-static/spring-cloud-aws/2.2.0.M1/#_using_message_converters)
>  which could be used to pass the GID and LID through the business object. 
>  After talking with ZhangLei about this issue, he suggested that we could 
> introduce a wrapper class for the user to pass the GID and LID across thread 
> or VM. As Omega can intercept the method call, we can restore the GID and LID 
> back to thread local variable before calling the intercepted method. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to