[ 
https://issues.apache.org/jira/browse/FELIX-939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sahoo updated FELIX-939:
------------------------

    Attachment: FELIX-937-938-939.patch.v3

Considering all the comments received so far in bugs #937, 938 & 939, I am 
attaching a new patch which emphasizes on retaining the old behavior while 
addressing the issues raised so far. 
For jar files in watched dir, new behavior is:
 1. If there are new jar files, it installs them and optionally starts them.
    1.1. If it fails to install a jar, it does not try to install it again until
           the jar has been modified.
    1.2. If it fail to start a bundle, it attempts to start it in following
           iterations until it succeeds or the corresponding jar is uninstalled.
 2. If some jar files have been deleted, it uninstalls them.
 3. If some jar files have been updated, it updates them.
     3.1. If it fails to update a bundle, it tries to update it in following
            iterations until it is successful.
 4. If any bundle gets updated or uninstalled, it refreshes the framework
     for the changes to take effect.
 5. If it detects any new installations, uninstallations or updations,
     it tries to start all the managed bundle unless it has been configured
     to only install bundles. 

> Optimize File Install
> ---------------------
>
>                 Key: FELIX-939
>                 URL: https://issues.apache.org/jira/browse/FELIX-939
>             Project: Felix
>          Issue Type: Improvement
>         Environment: generic
>            Reporter: Sahoo
>         Attachments: FELIX-937-938-939.patch, FELIX-937-938-939.patch.v2, 
> FELIX-937-938-939.patch.v3
>
>
> File Install has a dedicated thread for every directory. That thread wakes up 
> periodically and then does the following:
> 1. Iterates over all the bundles by calling context.getBundles
> 2. Finds out all bundles which belong to watchedDir. It starts them.
> 3. Finds if there is any new jar file in the watchedDir. It installs them.
> 4. Finds out if any jar has been deleted from watcheDir. It uninstalls 
> corresponding bundles.
> 5. Finds out if any jar has been modified. It updates the corresponding 
> bundles.
> I think there is some scope for optimization here. Especially step #2 seems 
> redundant if there has been change in the file system. More over, if out of 
> all the bundles in the system, only a few belong to watchedDir, then the 
> current implementation performs poorly. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to