[ 
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.v2

I am attaching a new patch which fixes the NPE that Filippo observed when he 
specified autostart bundles using relative path (e.g., file:bundle/foo.jar). 

The solution to the above problem is that we now keep track of bundles that we 
don't process any opaque URIs anymore. This means, we won't exactly know if we 
are going to install a bundle from watchedDir which is already installed as 
part of autostart bundle list. As a result, we get exception while trying to 
install the bundle (see FELIX-937). When that happens, we just ensure that we 
won't attempt to install that bundle again until it is deleted and recreated. 

Filippo,

I will really appreciate if you can try this patch once in your environment.


> 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
>
>
> 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