Hi,

I just had a look at Christian Schneider's code that delays startup of
the console. It just periodically checks the list of installed bundles
and stops when it's startup is finished.
I don't think it can be reused for this purpose.

I think the real problem is that bundles with start-level 80 (default
for bundles in deploy) are started before other bundles specified in
features-core with lower start-level (in our case 40).

A specific solution would be, when starting the bundle providing the
weaving hook, to check all installed bundles whether they would require
weaving. If a bundle does, refresh it, so that the weaving hook is applied.

Maybe this can be fixed by adding an option to refresh all hot-deployed
bundles when features-core is finished installing the features from
features.cfg

WDYT?

kind regards,
christoph



On 18/07/12 19:07, Andreas Pieber wrote:
> maybe there is some other way delay deploy folder loading till all
> bundles are at least started? Since Christian is after something here
> anyhow (he'll need something similar for his startup logic anyhow)
> maybe we can reuse parts of this logic? Or is there something
> completely different possibly here?
> 
> Kind regards,
> Andreas
> 
> On Wed, Jul 18, 2012 at 6:56 PM, Guillaume Nodet <[email protected]> wrote:
>> Yes, that would be a problem, because fileinstall is the one that grabs all
>> the configuration from the etc/ directory and that needs to be done early in
>> the process.
>>
>> On Wed, Jul 18, 2012 at 6:37 PM, Christoph Gritschenberger
>> <[email protected]> wrote:
>>>
>>> Hi,
>>>
>>> We recently started using Weaving Hooks in our Project (running in
>>> karaf-3.0.0-SNAPSHOT) and ran into a Problem:
>>>
>>> When deploying a bundle using the deploy-directory the bundle might get
>>> installed before the weaving hook is active. This causes the bundle to
>>> remain unweaved.
>>>
>>> We described the weaving-hook as part of a feature in a features.xml and
>>> added it to featuresBoot in org.apache.karaf.features.cfg. (We use
>>> start-level 40 for it as start-levels lower than 30 caused issues with
>>> aries because it obviously does not like bundle that are started before
>>> itself.)
>>>
>>> Now the Felix File installer is started with start-level 17, so it might
>>> pick up the bundle in the deploy-folder way before Karaf loads the
>>> feature-core that would install the feature of the weaver.
>>> My question is, does it even make sense to start the file installer
>>> earlier than the features-core-bundle?
>>> As far as I can tell it would make more sense to start the Feature-core
>>> before the file-installer, or does that cause other problems?
>>>
>>> WDYT?
>>>
>>> kind regards,
>>> christoph
>>>
>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> FuseSource, Integration everywhere
>> http://fusesource.com


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to