aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Ross (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1491) Fragment-host bundle is refreshed when a new fragment is installed
Date Wed, 03 Feb 2016 13:07:39 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130355#comment-15130355
] 

John Ross commented on ARIES-1491:
----------------------------------

So then the motivating use case here is when it is not possible to ensure that all subsystems
are installed first before starting any. You have an environment in which subsystems containing
fragments may come and go after the subsystem containing the host bundle has been started.
Note that simply stopping then starting the host subsystem will not work since the bundles
will remain in the RESOLVED state, and resolving an already RESOLVED bundle is a no-op.

You noted that refreshing only the host bundle works. Is this something you've actually tried?
It should work in theory since both Felix and Equinox will automatically search for installed
fragments as part of a host bundle's resolution, but would be nice to know for sure.  Refreshing
only the host bundle is a much simpler task for a client then having to compute the host as
well as all fragments itself.

I can think of the following possible implementations.

(1) Always refresh a subsystem's bundles as part of starting. Heavyweight. Affects everyone
all the time.

(2) Always refresh a subsystem's bundles as part of starting if indicated by a configurable
property whose default value would result in the current behavior. Heavyweight if the desired
behavior is not often necessary.

(3) Detect installing fragments, query the current state of the host, refresh if necessary.
Optimal for this particular case but are there other cases when a refresh would be desirable
that we want to address? Also, are there cases where this behavior would be undesirable (i.e.
should the behavior be configurable)?

(4) Add an additional method to the AriesSubsystem interface called "startWithRefresh", or
simply "restart" where the refresh is implied, or whatever name is desired, and let clients
dictate exactly when a refresh should occur. It's not clear if this adds any value above and
beyond simply calling FrameworkWiring.refreshBundles() on the host.

> Fragment-host bundle is refreshed when a new fragment is installed
> ------------------------------------------------------------------
>
>                 Key: ARIES-1491
>                 URL: https://issues.apache.org/jira/browse/ARIES-1491
>             Project: Aries
>          Issue Type: Improvement
>          Components: Subsystem
>    Affects Versions: subsystem-2.0.8
>            Reporter: Wouter Bancken
>
> The Felix framework will not allow fragments to attach to an already resolved host. This
results in resolution errors when a new fragment bundle appears in a new subsystem while the
fragment-host is in an already started subsystem. 
> These resolution errors can be resolved by refreshing (FrameworkWiring.refreshBundles)
the resolved fragment-host bundle after installing the fragment. 
> Aries could do this automatically when it encounters a fragment-host requirement when
resolving a subsystem. 
> Related mailinglist discussion: http://mail-archives.apache.org/mod_mbox/aries-user/201602.mbox/browser



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message