[ 
https://issues.apache.org/jira/browse/MNG-8221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875895#comment-17875895
 ] 

Guillaume Nodet commented on MNG-8221:
--------------------------------------

The component that needs to receive a Session should be annotated with 
@SessionScope.  The @Singleton should be injected a proxy to the scoped 
component.

See https://issues.apache.org/jira/browse/MNG-7662

> Maven DI lacks of javax.inject.Provider equivalent
> --------------------------------------------------
>
>                 Key: MNG-8221
>                 URL: https://issues.apache.org/jira/browse/MNG-8221
>             Project: Maven
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 4.0.0-beta-3
>            Reporter: Tamas Cservenak
>            Priority: Major
>             Fix For: 4.0.0-beta-4
>
>
> Usually used to have "placeholder" in components that scope is wider than the 
> one injected (typically: singleton component wants session, so it can inject 
> provider<session> but it have to make sure that provider.get is invoked ONLY 
> within session scope).
> Or how to implement this pattern now?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to