felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: [jira] Created: (FELIX-875) Support updating the system bundle
Date Tue, 13 Jan 2009 07:38:03 GMT
Hi Richard,

Richard S. Hall schrieb:
> Bundle.update() is not supported by Felix on the system bundle...as far
> as I know. It really depends on how we want this to work, but it might
> be a little tricky.

Yes true. For this reason I extend the Felix class in the Sling launcher
and overwrite the stop and update methods. The update methods are redone
to just shutdown the framework. When the framework has stopped, I know
whether the stop or update method was called and know whether I should
restart it or not. When I restart the framework I actually create a new
classloader and start the framework with this new classloader.

And yes, using the InputStream of the system bundle update(InputStream)
call is a bit bending the spec (should I say violate ?) ;-) But it works
since my Felix extension overwrites the update(InputStream) method and
takes that stream.

So for the Felix Framework itself, it is IMHO probably ok to just shut
the framwork down on update - the framework itself cannot do much about
except shutting down and reporting the correct FrameworkEvent from the
stopAndWait method.

Regards
Felix

> 
> -> richard
> 
> Felix Meschberger (JIRA) wrote:
>> Support updating the system bundle
>> ----------------------------------
>>
>>                  Key: FELIX-875
>>                  URL: https://issues.apache.org/jira/browse/FELIX-875
>>              Project: Felix
>>           Issue Type: Improvement
>>           Components: Web Console
>>     Affects Versions: webconsole-1.2.2
>>             Reporter: Felix Meschberger
>>             Assignee: Felix Meschberger
>>              Fix For: webconsole-1.2.4
>>
>>
>> Currently the web console does not support updating the system bundle.
>> A simple enhancement in the InstallAction class handling bundle update
>> supports this update.
>>
>> Background: When a bundle file is submitted for installaiton (or
>> update) in the respective form on the bundle page, the web console
>> analyses the bundle file to find a matching bundle to update by the
>> symbolic name. If no matching bundle is found, the bundle is installed
>> as a new bundle.
>>
>> This mechanism could also be used to update the system bundle. But the
>> symbolic name of the system bundle is special, since the
>> "system.bundle" strings is not the required name but just an alias. To
>> sitll support the system bundle, the InstallAction checker for the
>> bundle to update should treat the strings "system.bundle" (the defined
>> alias for the symbolic name) and "System Bundle" (the defined location
>> for the system bundle) as indications to update the system bundle.
>>
>> Generally, this may just restart the framework and not actually update
>> the system bundle. But there may be cases, where this already helps.In
>> addition it might prevent potential problems, if some administrator
>> tries to install a bundle, which happens to have the respective
>> symbolic name.
>>
>>   
> 

Mime
View raw message