Bundle state and SCR component state are (mostly) independent.  If I’ve 
understood your use case this is the solution you want (configurationPolicy =
ConfigurationPolicy.REQUIRE results in requiring a configuration to be present 
for your component to activate).

Generally immediate = true is not very helpful, but you may be in one of the 
cases where it’s useful.

David Jencks

> On Sep 21, 2020, at 10:55 AM, Steinar Bang <s...@dod.no> wrote:
> 
>>>>>> Francois Papon <francois.pa...@openobject.fr>:
> 
>> Hi,
>> May be you can try with:
> 
>> @Component(immediate = true, configurationPolicy =
>> ConfigurationPolicy.REQUIRE)
> 
> With this annotation in place, the breakpoint in the @Activate method
> wasn't called on initial startup (all bundles still showed up as
> Active... is this expected?).
> 
> When the 
> no.priv.bang.oldalbum.roleadder.test.ShiroRoleAdderForOldalbumTestEnvironment.cfg
> file was in the etc directory, the breakpoint was triggered.
> 
> I tried both with and without prerequisite="true", and the behaviour was
> identical.
> 
> Thanks!
> 

Reply via email to