You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierrick (JIRA)" <ji...@apache.org> on 2014/09/22 09:21:34 UTC
[jira] [Commented] (FELIX-4646) @Context(Context.Source.INSTANCE)
does not inject bundle context
[ 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)