You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Sauthier (JIRA)" <ji...@apache.org> on 2013/09/17 10:24:51 UTC

[jira] [Created] (FELIX-4229) Provide a way to obtain the component's BundleContext (other than constructor injection)

Guillaume Sauthier created FELIX-4229:
-----------------------------------------

             Summary: 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


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira