You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by derekv <de...@yahoo.com> on 2009/05/19 19:46:06 UTC

updating fragment bundles

Lets say i have bundle A and fragment bundle B that is associated with bundle
A.
Lets say i am using the File Install service.
If i need to update a class in fragment bundle B can i simply drop the new
jar file in the folder and everything is taken care of.
Or do i need to perform some manual steps?
Does the host bundle need to do some type of refresh for it to pick up the
changed class?

I have been searching for some kind of documentation on the lifecycle of a
fragment bundle and how it relates to the host bundle but have not been able
to find anything.
-- 
View this message in context: http://www.nabble.com/updating-fragment-bundles-tp23621182p23621182.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: updating fragment bundles

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 5/19/09 2:09 PM, derekv wrote:
>
> FilippoDiotalevi wrote:
>    
>> per specification:
>>
>> "When an attached fragment bundle is updated, the content of the previous
>> fragment must remain attached to its host bundle. The new content of the
>> updated fragment must not be allowed to attach to the host bundle until
>> the
>> Framework is restarted or the host bundle is refreshed. During this time,
>> an
>> attached fragment will have two versions: the old version, attached to the
>> old version of the host, and a new fragment bundle that can get attached
>> to a
>> new version or to a different host bundle.
>> "
>>
>>      
>
> So does the File Install service refresh the host bundle automatically in
> order for it to pick up the changes in the fragment bundle? Sure would be
> nice if it did.
>    

File Install automatically refreshes if any bundles were updated or 
uninstalled. This should be sufficient to get the updated fragment to 
reattach to the host, but the simplest way to see is to try.

-> richard

> thanks.
>    

Re: updating fragment bundles

Posted by derekv <de...@yahoo.com>.


FilippoDiotalevi wrote:
> 
> per specification:
> 
> "When an attached fragment bundle is updated, the content of the previous
> fragment must remain attached to its host bundle. The new content of the
> updated fragment must not be allowed to attach to the host bundle until
> the
> Framework is restarted or the host bundle is refreshed. During this time,
> an
> attached fragment will have two versions: the old version, attached to the
> old version of the host, and a new fragment bundle that can get attached
> to a
> new version or to a different host bundle.
> "
> 

So does the File Install service refresh the host bundle automatically in
order for it to pick up the changes in the fragment bundle? Sure would be
nice if it did.

thanks.
-- 
View this message in context: http://www.nabble.com/updating-fragment-bundles-tp23621182p23621577.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: updating fragment bundles

Posted by Filippo Diotalevi <fi...@gmail.com>.
On Tue, May 19, 2009 at 7:46 PM, derekv <de...@yahoo.com> wrote:
>
> Lets say i have bundle A and fragment bundle B that is associated with bundle
> A.
> Lets say i am using the File Install service.
> If i need to update a class in fragment bundle B can i simply drop the new
> jar file in the folder and everything is taken care of.
> Or do i need to perform some manual steps?
> Does the host bundle need to do some type of refresh for it to pick up the
> changed class?
>
> I have been searching for some kind of documentation on the lifecycle of a
> fragment bundle and how it relates to the host bundle but have not been able
> to find anything.

Hi,
per specification:

"When an attached fragment bundle is updated, the content of the previous
fragment must remain attached to its host bundle. The new content of the
updated fragment must not be allowed to attach to the host bundle until the
Framework is restarted or the host bundle is refreshed. During this time, an
attached fragment will have two versions: the old version, attached to the
old version of the host, and a new fragment bundle that can get attached to a
new version or to a different host bundle.
"



-- 
Filippo Diotalevi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: updating fragment bundles

Posted by "Richard S. Hall" <he...@ungoverned.org>.
This is fairly similar to performing any update. If a bundle is wired to 
some bundle, updating the target of the wire will not be seen by the 
source unless a refresh is performed. This is no different for packages 
or fragments.

So, to answer your question, you will need to refresh. However, I think 
File Install does a refresh automatically after an update.

-> richard

On 5/19/09 1:46 PM, derekv wrote:
> Lets say i have bundle A and fragment bundle B that is associated with bundle
> A.
> Lets say i am using the File Install service.
> If i need to update a class in fragment bundle B can i simply drop the new
> jar file in the folder and everything is taken care of.
> Or do i need to perform some manual steps?
> Does the host bundle need to do some type of refresh for it to pick up the
> changed class?
>
> I have been searching for some kind of documentation on the lifecycle of a
> fragment bundle and how it relates to the host bundle but have not been able
> to find anything.
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org