[jira] [Commented] (FELIX-5649) Refreshing a fragment causes the framework to be restarted
[ https://issues.apache.org/jira/browse/FELIX-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039481#comment-16039481 ] Richard S. Hall commented on FELIX-5649: Ok, I see what you are saying. The reasoning behind not letting the ee requirement be hosted is not clear to me, although I understand there is no need to resolve the ee requirement more than once for hosting, it does no harm to do it more than once and doesn't create a special case. But if that is the case, then yes it does seem like refreshing should only consider host requirements when refreshing fragment dependencies. > Refreshing a fragment causes the framework to be restarted > -- > > Key: FELIX-5649 > URL: https://issues.apache.org/jira/browse/FELIX-5649 > Project: Felix > Issue Type: Bug >Affects Versions: framework-5.6.2 >Reporter: Guillaume Nodet > > This is caused because the fragment has 2 wires: one to its host and another > one to the system bundle for an osgi.ee requirement. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FELIX-5649) Refreshing a fragment causes the framework to be restarted
[ https://issues.apache.org/jira/browse/FELIX-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039362#comment-16039362 ] Guillaume Nodet commented on FELIX-5649: See the section 7.4: {code} A fragment bundle will show all its declared capabilities and requirements on its Bundle Revision but during resolving the resolver only considers the osgi.wiring.host and osgi.ee requirements and the osgi.identity capability and requirements. The osgi.wiring.host requirement represents the Fragment-Host header. A fragment can be attached to different hosts and each attachment creates a wire from the fragment's Bundle Wiring to the host's Bundle Wiring. The osgi.ee requirement is also never hosted. {code} > Refreshing a fragment causes the framework to be restarted > -- > > Key: FELIX-5649 > URL: https://issues.apache.org/jira/browse/FELIX-5649 > Project: Felix > Issue Type: Bug >Affects Versions: framework-5.6.2 >Reporter: Guillaume Nodet > > This is caused because the fragment has 2 wires: one to its host and another > one to the system bundle for an osgi.ee requirement. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FELIX-5649) Refreshing a fragment causes the framework to be restarted
[ https://issues.apache.org/jira/browse/FELIX-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039347#comment-16039347 ] Guillaume Nodet commented on FELIX-5649: In my case, the fragment is not an extension. But reading the spec and the resolver impl lead me to think that osgi.ee requirements are not hosted, i.e. they are wired from the fragment itself and not its host. That has been the case at least from framework 5.0.0 release. If that's correct, then we simply need to only take into account host wires when calculating dependencies as suggested by my patch above. > Refreshing a fragment causes the framework to be restarted > -- > > Key: FELIX-5649 > URL: https://issues.apache.org/jira/browse/FELIX-5649 > Project: Felix > Issue Type: Bug >Affects Versions: framework-5.6.2 >Reporter: Guillaume Nodet > > This is caused because the fragment has 2 wires: one to its host and another > one to the system bundle for an osgi.ee requirement. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FELIX-5649) Refreshing a fragment causes the framework to be restarted
[ https://issues.apache.org/jira/browse/FELIX-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039064#comment-16039064 ] Karl Pauls commented on FELIX-5649: --- Yeah, I'm a bit confused as well. As [~gnodet] references 3.15.1 it almost sounds like we are talking about an extension bundle - in which case, it would be correct that the framework gets refreshed (from the spec 3.15): "If a RESOLVED extension bundle is refreshed then the Framework must shutdown; the host VM must terminate and framework must be re-launched." Obviously, if we are talking about a "normal" fragment, it shouldn't. > Refreshing a fragment causes the framework to be restarted > -- > > Key: FELIX-5649 > URL: https://issues.apache.org/jira/browse/FELIX-5649 > Project: Felix > Issue Type: Bug >Affects Versions: framework-5.6.2 >Reporter: Guillaume Nodet > > This is caused because the fragment has 2 wires: one to its host and another > one to the system bundle for an osgi.ee requirement. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FELIX-5649) Refreshing a fragment causes the framework to be restarted
[ https://issues.apache.org/jira/browse/FELIX-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039031#comment-16039031 ] Richard S. Hall commented on FELIX-5649: Fragments can have multiple wires, but they should only be wires to hosts, they shouldn't have any other type of wire, IIRC. I could be wrong, but I thought a fragment attached to the system bundle does cause a framework refresh, though. > Refreshing a fragment causes the framework to be restarted > -- > > Key: FELIX-5649 > URL: https://issues.apache.org/jira/browse/FELIX-5649 > Project: Felix > Issue Type: Bug >Affects Versions: framework-5.6.2 >Reporter: Guillaume Nodet > > This is caused because the fragment has 2 wires: one to its host and another > one to the system bundle for an osgi.ee requirement. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FELIX-5649) Refreshing a fragment causes the framework to be restarted
[ https://issues.apache.org/jira/browse/FELIX-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039010#comment-16039010 ] Guillaume Nodet commented on FELIX-5649: >From the specs (section 3.15.1, >https://github.com/apache/felix/blob/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java#L2027-L2028), > it seems that the fact that there are 2 wires on the fragment is expected. However, such a wire should definitely not cause a refresh of the framework if a fragment is refreshed. So I'm planning to add an additional test around the following line: https://github.com/apache/felix/blob/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java#L173 {code} if (HostNamespace.HOST_NAMESPACE.equals(bw.getCapability().getNamespace())) { result.add(bw.getProvider().getBundle()); } {code} > Refreshing a fragment causes the framework to be restarted > -- > > Key: FELIX-5649 > URL: https://issues.apache.org/jira/browse/FELIX-5649 > Project: Felix > Issue Type: Bug >Affects Versions: framework-5.6.2 >Reporter: Guillaume Nodet > > This is caused because the fragment has 2 wires: one to its host and another > one to the system bundle for an osgi.ee requirement. -- This message was sent by Atlassian JIRA (v6.3.15#6346)