snazy commented on PR #589: URL: https://github.com/apache/polaris/pull/589#issuecomment-2599702812
@collado-mike I think we all agree that a ThreadLocal is generally not a good choice. The issue tackled here is #463, which has been open for more than two months - nobody commented on that issue. Sure, this PR has been merged quite quickly, maybe too quick. But this PR does nothing else than what #463 describes. We all explicitly agreed that we want to move to CDI and we all explicitly agreed that we want to move to Quarkus. #463 also mentions that `@RequestScoped` injection is also a way to pass information around to the interested consumers. The documented contract of that interface said: `Stores elements associated with an individual REST request such as RealmContext, caller identity/role, authn/authz, etc.` . It says nothing about being a public extension point. The factory functions of the interface imply that there is no other information. The only implementation of that interface documents `The Call context is allocated each time a new REST request is processed. It contains instances of low-level services required to process that `request`. `@RequestScoped` injection with request-scoped producers is a CDI conformant way to pass request-contextual information around. It generally helps when the documentation are clear about the intent and structure of the code (package naming, module structure) supports/separates the intent and scope. It would be good to know what exactly is no longer possible with `@RequestScoped`. I am sure we can find alternatives there. CC @jbonofre @dimas-b @adutra @takidau @dennishuo @eric-maynard @flyrain @RussellSpitzer -- 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. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org