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

Repeatable @Scope [SPR-17158] #21695

spring-projects-issues opened this issue Aug 9, 2018 · 0 comments

Repeatable @Scope [SPR-17158] #21695

spring-projects-issues opened this issue Aug 9, 2018 · 0 comments
in: core status: waiting-for-triage


Copy link

@spring-projects-issues spring-projects-issues commented Aug 9, 2018

Caleb Cushing opened SPR-17158 and commented

so one of the problems, I'm looking at with logging, is the idea, that a request doesn't imply a transaction, and a transaction doesn't imply a request. I'd like to have my scope eagerly instantiated if either begins, the ideally they would share that bean until the last scope ended. That might be hard though... might be easier to create a different bean for each scope.

 static CloseableThreadContext.Instance requestContext(
     @Value( "${dex.environment}" ) String env,
     String hostname
 {// spring will close
     CloseableThreadContext.Instance ctx = CloseableThreadContext.put( "env", env );
     ctx.put( "hostname", hostname );
     return ctx;

Issue Links:

@spring-projects-issues spring-projects-issues added status: waiting-for-triage type: enhancement in: core and removed type: enhancement labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core status: waiting-for-triage
None yet

No branches or pull requests

1 participant