You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Clement Escoffier (JIRA)" <ji...@apache.org> on 2014/03/09 20:44:44 UTC
[jira] [Resolved] (FELIX-4229) Provide a way to obtain the
component's BundleContext (other than constructor injection)
[ https://issues.apache.org/jira/browse/FELIX-4229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clement Escoffier resolved FELIX-4229.
--------------------------------------
Resolution: Fixed
Fix Version/s: ipojo-runtime-1.12.0
Assignee: Clement Escoffier
Fixed in trunk
> Provide a way to obtain the component's BundleContext (other than constructor injection)
> ----------------------------------------------------------------------------------------
>
> Key: FELIX-4229
> URL: https://issues.apache.org/jira/browse/FELIX-4229
> Project: Felix
> Issue Type: Bug
> Components: iPOJO
> Reporter: Guillaume Sauthier
> Assignee: Clement Escoffier
> Fix For: ipojo-runtime-1.12.0
>
>
> Currently, the only common way to get the component's BundleContext is to use constructor injection.
> If we need a no-arg constructor, this is not possible to use that feature.
> It is also possible to be the BundleContext though @PostRegistration annotation, but it's only usable if your component provides a service.
> I need another way to get my BundleContext.
> Maybe something like:
> {code}
> @Requires / @Inject
> private BundleContext bundleContext;
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)