gnodet commented on PR #1337:
URL: https://github.com/apache/maven/pull/1337#issuecomment-1860051716

   > I agree with 
[49cec29](https://github.com/apache/maven/commit/49cec292edce1b8aeb5d8f54a7e729ad70f00a5b)
 commit: if component changed to session scope, no need for provider. But I 
don't understand 2nd commit 
[5ce5279](https://github.com/apache/maven/commit/5ce52798bea3c990bd407ef3b6cf2e5b6000e7fd)
 that left components singletons, but you removed the provider.
   > 
   > Can you explain that? As your 2nd commit makes mandatory to rebuild 
component graph in case of schema change, while with provider it was possible 
without doing that.
   
   So what kind of schema change do you have in mind exactly ?
   
   I'm not buying the idea to use Provider at the injection point to control 
the lifecycle of dependent beans.  If we suppose a plugin can register any kind 
of component and that it should override the default component set, then all 
injection points have to use Provider.  Such components are supposed to be 
provided by extensions, which do not change.  Fwiw, I think we do overuse the 
`@Singleton` and most components are defined as singletons but this is 
unnecessary because they are stateless.  `@Singleton` should be used for 
classes that actually need to be singletons.
   


-- 
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...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to