felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Barthel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4436) DirectoryWatcher should not "refresh" Blueprint XML deployments on every start-up
Date Thu, 13 Mar 2014 23:59:43 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13934320#comment-13934320

Uwe Barthel commented on FELIX-4436:

Hi metatech,

Thx for review my patch.
To be honest, I do not understand how your patch is supposed to solve the problem, could you
please elaborate ?
The idea behind my patch is to prevent to put the bundle into the {{installedBundles}} collection.
This collection will be added into the {{toRefresh}} set, which you comment out in your patch.

If you're going the way back, you'll find a long if-else statement. In this if-else statement,
it's about if the file exists and whether an {{Artifact}} object exists.

If this {{Artifact}} object is not found, it is newly created and inserted into the {{toRefresh}}

A list of all known {{Artifact}} objects is collected at startup in the method {{#initializeCurrentManagedBundles()}}.
Creating the {{Artifact}} object for the Blueprint XML file based on the path of the found
file and the Bundle Location of the already known bundles.

I hope this and my explanation above, have explained my thought better.
Also, I notice that on Windows, the path extraction algorithm does not work, because there
is an extra colon in the path, eg C:/
You're absolutely right. My solution is not optimal at this point. Perhaps it is better to
search {{file:}}, instead of the last colon. This could be the reason why it does not work
for you.

I've change the implementation. Please try it again.
Did you run the {{DirectoryWatcherTest}} test?


> DirectoryWatcher should not "refresh" Blueprint XML deployments on every start-up
> ---------------------------------------------------------------------------------
>                 Key: FELIX-4436
>                 URL: https://issues.apache.org/jira/browse/FELIX-4436
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-3.2.4
>         Environment: ServiceMix 4.5.3
>            Reporter: metatech
>            Priority: Minor
>         Attachments: felix_no_refresh_installed.patch
> DirectoryWatcher can auto-deploy JAR or XML files placed in a directory.
> Blueprint XML files (containing for instance ActiveMQ factories or JAAS realms) are detected
as "installed" on every start-up.  Prior to FELIX-2066, this had no effect.  Since FELIX-2066,
bundles detected as "installed" are now forcibly "refreshed" on every start-up.  The impact
is that these bundles are stopped and restarted during the container start-up.  Because there
are some race conditions (see FELIX-3067), this can prevent those XML files or other bundles
depending on them from fully starting.  Here is a patch which avoids restarting those bundles
when they were not modified.

This message was sent by Atlassian JIRA

View raw message