felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierrick (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4646) @Context(Context.Source.INSTANCE) does not inject bundle context
Date Mon, 22 Sep 2014 07:21:34 GMT

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

Pierrick commented on FELIX-4646:
---------------------------------

Hello,

To create the new instance, i use the following code :

@Configuration
public class newInstance {
    Instance myInstance = instance().of(ComponentToInstanciate.class).named(newName).with(proprietyName).setto(proprietyValue);
}

ComponentToInstanciate is in an other bundle, and dependencies works.

> @Context(Context.Source.INSTANCE) does not inject bundle context
> ----------------------------------------------------------------
>
>                 Key: FELIX-4646
>                 URL: https://issues.apache.org/jira/browse/FELIX-4646
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-runtime-1.12.0
>         Environment: JAVA 1.8
>            Reporter: Pierrick
>            Assignee: Clement Escoffier
>            Priority: Blocker
>
> I would like to use the bundle context for each instanciate of my bundle with this code
:
> @Context(Context.Source.INSTANCE)
>     private BundleContext _context;
> But the context return is null.
> If I use Context.Source.COMPONENT for the context definition, the context field is injected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message