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/08/27 19:09:57 UTC

[jira] [Resolved] (FELIX-4621) bad injected bundle context when instances are defined using @Configuration

     [ https://issues.apache.org/jira/browse/FELIX-4621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier resolved FELIX-4621.
--------------------------------------

    Resolution: Invalid
      Assignee: Clement Escoffier

This is the default behavior.

If you need the instance's bundle context, use:

{code}
@Component
public MyComponent {
    /**
     * Injects the instance bundle context
     */
    @Context(Context.Source.INSTANCE)
    private BundleContext context;
}
{code}

> bad injected bundle context when instances are defined using @Configuration
> ---------------------------------------------------------------------------
>
>                 Key: FELIX-4621
>                 URL: https://issues.apache.org/jira/browse/FELIX-4621
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-runtime-1.12.0
>         Environment: Mac OS X
>            Reporter: Thomas Leveque
>            Assignee: Clement Escoffier
>
> When you define a component class in a bundle B1 and define instances in a bundle B2 using @Configuration annotation, the injected bundle context into the instance is B1 instead of B2.



--
This message was sent by Atlassian JIRA
(v6.2#6252)