Christoph Läubrich opened MNG-7401 and commented
I noticed that a session is often cloned due to change the current project for a while.
As this works for everyone passing down the session, consumers of the "upper session" (e.g. a SessionScoped Component) would never see this if they are (indirectly) called and e.g. use Session#getCurrentProject().
I wonder if MavenSession could simply use a ThreadLocal for the currentProject (that is shared accross all cloned sessions), that way one would always get the correct value.
Issue Links:
-
MNG-7347 SessionScoped beans should be singletons for a given session
-
MNG-7455 [REGRESSION] IllegalStateException in SessionScope during guice injection in multithreaded build
-
MNG-7474 SessionScoped beans should be singletons for a given session
("is required by")
Remote Links:
Backported to: 4.0.0-alpha-2, 3.9.0
Christoph Läubrich opened MNG-7401 and commented
I noticed that a session is often cloned due to change the current project for a while.
As this works for everyone passing down the session, consumers of the "upper session" (e.g. a SessionScoped Component) would never see this if they are (indirectly) called and e.g. use Session#getCurrentProject().
I wonder if MavenSession could simply use a ThreadLocal for the currentProject (that is shared accross all cloned sessions), that way one would always get the correct value.
Issue Links:
MNG-7347 SessionScoped beans should be singletons for a given session
MNG-7455 [REGRESSION] IllegalStateException in SessionScope during guice injection in multithreaded build
MNG-7474 SessionScoped beans should be singletons for a given session
("is required by")
Remote Links:
Backported to: 4.0.0-alpha-2, 3.9.0