Hi,

You have to use sync mode or check that the feature is started.

Did you check if you don't have refresh on your bundles, probably due to
optional imports ?

Can you ping me private to help you ?

Regards
JB

On 12/09/2018 11:38, Lukasz Lech wrote:
> Hello,
> 
>  
> 
> Sorry for asking once again, but making my application run after
> updating Karaf to version 4.2.1 is giving me headache…  Many things that
> have worked before doesn’t work without obvious reason…
> 
>  
> 
> I was installing features with my own code. I’ve called
> FeatureService.installFeatures() and after it returned, I was issuing
> SystemService.halt(). Afterwards I’ve got Karaf that was ready to be
> packaged and delivered into test.
> 
>  
> 
> In 4.2.1 this doesn’t work because my code, which is a feature on its
> own, is restarted when I call installFeatures, therefore I get
> InterruptedException. In that moment, when I stop Karaf, I’ll stop
> installing features and end up with Karaf with incomplete set of bundles.
> 
>  
> 
> So I’ve decided to do otherwise: provide a channel which I can ask if
> all features were installed. I call for feature status with
> FeatureService.getState(featureId) and when I get true, I return OK.
> Then the build script issues ./bin/stop to stop karaf. But then I’m
> getting karaf container that have all bundles, but after starting, many
> of them are ‘Resolved’, not started.
> 
>  
> 
> Why it is so? Do the SystemService.halt() makes more ‘gentle’ shutdown
> then ./bin/stop ? Or I’m stopping Karaf prematurely, before the start
> was issued on each bundle? How can I check then, when it’s OK to stop
> Karaf? I can’t assume how long will it take, we have gitlab based build
> pipeline, so the build time is strongly dependent on the load put on
> build machines.
> 
>  
> 
> I can’t check for bundle status because bundles won’t start correctly in
> build environment, but previously it was exactly the same. Nevertheless,
> in non-build environment, where all dependencies were provided, every
> single bundle was started after starting karaf…
> 
>  
> 
> Best Regards,
> 
> Lukasz Lech
> 
>  
> 

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to