You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Michael Prieß <ma...@googlemail.com> on 2013/05/13 19:36:20 UTC

Provisioning vs. Felix Fileinstaller

Hi,

actually I use features to deploy all my OSGi bundles. But
to initialize some infrastructure for example an embedded broker I use 2-3
Spring XML files which are located in the deploy directory.

Now I have the following behavior: The Spring XML files are deployed before
the provisioning happen and the deployment of some Spring XML isn't
possible. If I restart the XML Bundles after bootup everything is fine.

Have maybe someone a pattern or an idea how to resolve this issue?

Why does the Fileinstaller doesn't work in combination with features with a
adjusted boot-up level?

Maybe those are separate modules which are doesn't care about each other?

Cheers,

Michael

Re: Provisioning vs. Felix Fileinstaller

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I think this is from OSGi very async nature.

We have put related bundles in etc/startup.properties, with fine tuned start level, there're

org/apache/felix/org.apache.felix.fileinstall/3.2.6/org.apache.felix.fileinstall-3.2.6.jar=11
org/apache/karaf/features/org.apache.karaf.features.core/2.3.1/org.apache.karaf.features.core-2.3.1.jar=30
org/apache/karaf/deployer/org.apache.karaf.deployer.features/2.3.1/org.apache.karaf.deployer.features-2.3.1.jar=30

And this works well in most cases,  it might cause problem in some cases, likely you put a features file in deploy folder, so if org.apache.felix.fileinstall get started and poll the deploy folder to load some file  but karaf features service and features deployer not available yet, you may see problems

I think you can edit etc/org.apache.felix.fileinstall-deploy.cfg, change
felix.fileinstall.poll to some bigger value, currently it's 1000ms, you can change it to something like 3000ms to let all fundamental bundles get fully started before the file install start to poll.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-14, at 上午1:36, Michael Prieß wrote:

> Hi,
> 
> actually I use features to deploy all my OSGi bundles. But to initialize some infrastructure for example an embedded broker I use 2-3 Spring XML files which are located in the deploy directory.
> 
> Now I have the following behavior: The Spring XML files are deployed before the provisioning happen and the deployment of some Spring XML isn't possible. If I restart the XML Bundles after bootup everything is fine.
> 
> Have maybe someone a pattern or an idea how to resolve this issue?
> 
> Why does the Fileinstaller doesn't work in combination with features with a adjusted boot-up level?
> 
> Maybe those are separate modules which are doesn't care about each other?
> 
> Cheers,
> 
> Michael