Guice request scope for Grpc service

26 views
Skip to first unread message

bira...@gmail.com

unread,
Jul 26, 2017, 1:26:15 AM7/26/17
to grpc.io
Hi

What's the best way to Grpc request processed in Guice request scope (or something similar)?
Since grpc request can be handled in more than one thread, transitional thread local based request scope would not work. 

Best
Ran

bira...@gmail.com

unread,
Jul 26, 2017, 1:26:43 AM7/26/17
to grpc.io, bira...@gmail.com
I am using grpc-java.

Adrian Cole

unread,
Jul 26, 2017, 1:48:59 AM7/26/17
to bira...@gmail.com, grpc.io
grpc has a Context type which is used to carry scoped data around.
might start looking there
https://github.com/grpc/grpc-java/blob/master/context/src/main/java/io/grpc/Context.java
Reply all
Reply to author
Forward
0 new messages