[
https://issues.apache.org/jira/browse/DELTASPIKE-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985244#comment-13985244
]
Karl Kildén commented on DELTASPIKE-582:
----------------------------------------
I tried your sample.
@ApplicationScoped worked very well for me. But for LoginView you need to use
composition instead of inheritance because of final methods. Try to not mix
BeanProvider.getContextual and @Inject in the same class, rather perhaps if (my
contextual == null) BeanProvider.injectFields(this) Exact syntax is easy to
find on the BeanProvider.
To summerize, use @ApplicationScoped in a desktop app (imo)
> BeanProvider produces 2 instances of the object java se
> -------------------------------------------------------
>
> Key: DELTASPIKE-582
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-582
> Project: DeltaSpike
> Issue Type: Bug
> Components: CdiControl
> Affects Versions: 0.6
> Environment: linux ubunutu, eclipse kepler, maven config, open web
> beans
> Reporter: Barbier
> Labels: BeanProvider
> Attachments: office.data.zip, office.service.zip,
> office.ui.fx.debug.zip, office.ui.fx.zip
>
>
> the injection process with the following code produces 2 instances of the
> object
> LoginModel model = BeanProvider.getContextualReference( ILoginModel.class );
--
This message was sent by Atlassian JIRA
(v6.2#6252)