[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2023-02-20 Thread Grzegorz Grzybek (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17691148#comment-17691148
 ] 

Grzegorz Grzybek commented on KARAF-6501:
-

I fixed this by ensuring that exported packages are not imported.

> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ bin/karaf
> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] 
> DEBUG : Handler for protocols [wrap] started
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Starting the host 1
> Starting the host 2
> Starting the host 3
> {noformat}
> *7. Check that the fragment is no longer correctly attached to all three 
> hosts, but just to one*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2023-02-20 Thread Grzegorz Grzybek (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17691146#comment-17691146
 ] 

Grzegorz Grzybek commented on KARAF-6501:
-

After another refresh (to wire pax-web-tomcat host and 
pax-web-tomcat-keycloak18 fragment), 
{{org.apache.karaf.features.extension.StoredWiringResolver#update()}} is called 
for the fragment, storing this:
{noformat}
osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 
9.0.0, 10.0.0, 11.0.0]
osgi.wiring.host; 
(&(osgi.wiring.host=org.ops4j.pax.web.pax-web-tomcat)(bundle-version>=0.0.0))
135
{noformat}

and for the host - however for the host, only these requirements are stored:
{noformat}
wiring: java.util.Map  = {java.util.HashMap@13830}  size = 79
 {@13912} "osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak.enums)(version>=18.0.0)(!(version>=19.0.0)))"
 -> {java.util.HashSet@13913}  size = 1
 {@13920} "osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak)(version>=18.0.0)(!(version>=19.0.0)))" -> 
{java.util.HashSet@13921}  size = 1
 {@13928} "osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak.adapters)(version>=18.0.0)(!(version>=19.0.0)))"
 -> {java.util.HashSet@13929}  size = 1
 {@14016} "osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak.representations)(version>=18.0.0)(!(version>=19.0.0)))"
 -> {java.util.HashSet@14017}  size = 1
 {@14032} "osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak.adapters.spi)(version>=18.0.0)(!(version>=19.0.0)))"
 -> {java.util.HashSet@14033}  size = 1
 {@14048} "osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak.common.util)(version>=18.0.0)(!(version>=19.0.0)))"
 -> {java.util.HashSet@14049}  size = 1
{noformat}

because self reference (for {{org.keycloak.adapters.tomcat}} package) is not 
present among the wires of host+fragment...

> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ 

[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2023-02-20 Thread Grzegorz Grzybek (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17691143#comment-17691143
 ] 

Grzegorz Grzybek commented on KARAF-6501:
-

The problem is that when Karaf restarts again ({{main}} thread):
{noformat}
"main@1" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
  at 
org.apache.karaf.features.extension.StoredWiringResolver.filterMatches(StoredWiringResolver.java:89)
  at 
org.apache.felix.framework.util.SecureAction.invokeResolverHookMatches(SecureAction.java:1630)
  at 
org.apache.felix.framework.StatefulResolver.findProvidersInternal(StatefulResolver.java:339)
  - locked <0x60e> (a org.apache.felix.framework.StatefulResolver)
  at 
org.apache.felix.framework.ResolveContextImpl.findProviders(ResolveContextImpl.java:114)
  at org.apache.felix.resolver.Candidates.populate(Candidates.java:208)
  at 
org.apache.felix.resolver.ResolverImpl.getInitialCandidates(ResolverImpl.java:542)
  at 
org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:431)
  at 
org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420)
  at 
org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374)
  at 
org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:488)
  at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4357)
  at 
org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:130)
  at 
org.apache.karaf.features.extension.Activator.resolveAll(Activator.java:62)
  at 
org.apache.karaf.features.extension.Activator.bundleChanged(Activator.java:49)
  at 
org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
  at 
org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
  at 
org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
  at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4847)
  at org.apache.felix.framework.Felix.start(Felix.java:1143)
  at org.apache.karaf.main.Main.launch(Main.java:297)
  at org.apache.karaf.main.Main.main(Main.java:183)
{noformat}

there's an attempt to process this requirement:
{noformat}
requirement = {org.apache.felix.framework.wiring.BundleRequirementImpl@4712} 
"[org.ops4j.pax.web.pax-web-tomcat-keycloak18 [97](R 97.0)] 
osgi.wiring.package; 
(&(osgi.wiring.package=org.keycloak.adapters.tomcat)(version>=18.0.0)(!(version>=19.0.0)))"
 m_attrs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4733}  size = 0
 m_dirs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4732}  size = 1
 m_filter: org.apache.felix.framework.capabilityset.SimpleFilter  = 
{org.apache.felix.framework.capabilityset.SimpleFilter@4731} 
"(&(osgi.wiring.package=org.keycloak.adapters.tomcat)(version>=18.0.0)(!(version>=19.0.0)))"
 m_namespace: java.lang.String  = {@4723} "osgi.wiring.package"
 m_optional: boolean  = false
 m_revision: org.osgi.framework.wiring.BundleRevision  = 
{org.apache.felix.framework.BundleRevisionImpl@4189} 
"org.ops4j.pax.web.pax-web-tomcat-keycloak18 [97](R 97.0)"
{noformat}

with found capability:
{noformat}
result = {org.apache.felix.framework.util.ShrinkableCollection@4715}  size = 1
 0 = {org.apache.felix.framework.wiring.BundleCapabilityImpl@4721} 
"[org.ops4j.pax.web.pax-web-tomcat-keycloak18 [97](R 97.0)] 
osgi.wiring.package; 
{bundle-symbolic-name=org.ops4j.pax.web.pax-web-tomcat-keycloak18, 
bundle-version=8.0.15, osgi.wiring.package=org.keycloak.adapters.tomcat, 
version=18.0.3}"
  m_attrs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4725}  size 
= 4
  m_dirs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4724}  size = 
1
  m_mandatory: java.util.Set  = {java.util.Collections$EmptySet@4727}  size = 0
  m_namespace: java.lang.String  = {@4723} "osgi.wiring.package"
  m_revision: org.osgi.framework.wiring.BundleRevision  = 
{org.apache.felix.framework.BundleRevisionImpl@4189} 
"org.ops4j.pax.web.pax-web-tomcat-keycloak18 [97](R 97.0)"
  m_uses: java.util.List  = {java.util.ArrayList@4726}  size = 8
{noformat}

when there's no {{org.apache.karaf.features.extension.BundleWires#wiring}} for 
host bundle for this requirement:
{noformat}
(&(osgi.wiring.package=org.keycloak.adapters.tomcat)(version>=18.0.0)(!(version>=19.0.0)))
{noformat}

This comes from the fragment itself, where the same package is exported and 
imported ({{org.keycloak.adapters.osgi.tomcat}}):
{noformat}
karaf@root()> headers 97

OPS4J Pax Web - Keycloak 18.x support - Tomcat (97)
---
Bnd-LastModified = 1676300516142
Build-Jdk-Spec = 1.8
Created-By = Apache Maven Bundle Plugin 5.1.8
Fragment-Host = org.ops4j.pax.web.pax-web-tomcat

[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2023-02-20 Thread Grzegorz Grzybek (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17691138#comment-17691138
 ] 

Grzegorz Grzybek commented on KARAF-6501:
-

[~jbonofre] [~nantunes] I have a problem here...

I have a bundle (pax-web-tomcat) and a fragment (pax-web-tomcat-keycloak18 - 
work in progress) which adds new {{Import-Package}} headers to pax-web-tomcat.

However even if the host+fragment is fine after installation, the host-fragment 
relation is gone after restart.

The fragment's requirement being resolved is:
{noformat}
requirement = {org.apache.felix.framework.wiring.BundleRequirementImpl@4233} 
"[org.ops4j.pax.web.pax-web-tomcat-keycloak18 [97](R 97.0)] 
osgi.wiring.package; (osgi.wiring.package=javax.security.cert)"
 m_attrs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4891}  size = 0
 m_dirs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4897}  size = 1
 m_filter: org.apache.felix.framework.capabilityset.SimpleFilter  = 
{org.apache.felix.framework.capabilityset.SimpleFilter@4256} 
"(osgi.wiring.package=javax.security.cert)"
 m_namespace: java.lang.String  = {@4890} "osgi.wiring.package"
 m_optional: boolean  = false
 m_revision: org.osgi.framework.wiring.BundleRevision  = 
{org.apache.felix.framework.BundleRevisionImpl@4189} 
"org.ops4j.pax.web.pax-web-tomcat-keycloak18 [97](R 97.0)"
{noformat}

The selected candidate in 
{{org.apache.karaf.features.extension.BundleWires#filterCandidates()}} is fine:
{noformat}
candidates = {org.apache.felix.framework.util.ShrinkableCollection@4294}  size 
= 1
 0 = {org.apache.felix.framework.wiring.BundleCapabilityImpl@4262} 
"[org.apache.felix.framework [0](R 0)] osgi.wiring.package; 
{bundle-symbolic-name=[Ljava.lang.String;@767e20cf, bundle-version=7.0.5, 
version=0.0.0, osgi.wiring.package=javax.security.cert}"
  m_attrs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4892}  size 
= 4
  m_dirs: java.util.Map  = {java.util.Collections$UnmodifiableMap@4891}  size = 0
  m_mandatory: java.util.Set  = {java.util.Collections$EmptySet@4882}  size = 0
  m_namespace: java.lang.String  = {@4890} "osgi.wiring.package"
  m_revision: org.osgi.framework.wiring.BundleRevision  = 
{org.apache.felix.framework.ExtensionManager$ExtensionManagerRevision@1496} 
"org.apache.felix.framework [0](R 0)"
  m_uses: java.util.List  = {java.util.Collections$EmptyList@4893}  size = 0
{noformat}

However, the candidate is flitered out because 
{{org.apache.karaf.features.extension.BundleWires#wiring}} doesn't contain a 
requirement ID {{osgi.wiring.package; 
(osgi.wiring.package=javax.security.cert)}...

> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  

[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2019-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17005143#comment-17005143
 ] 

ASF subversion and git services commented on KARAF-6501:


Commit 44a0ade14205db04f343dd93c5265d65986a92fc in karaf's branch 
refs/heads/karaf-4.2.x from Nelson Antunes
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=44a0ade ]

[KARAF-6501] Restoring the wiring of fragment bundles with multiple hosts

(cherry picked from commit 7cc3a03fee40c0214ca28c0fd56686928137a55b)


> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ bin/karaf
> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] 
> DEBUG : Handler for protocols [wrap] started
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Starting the host 1
> Starting the host 2
> Starting the host 3
> {noformat}
> *7. Check that the fragment is no longer correctly attached to all three 
> hosts, but just to one*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2019-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17005140#comment-17005140
 ] 

ASF subversion and git services commented on KARAF-6501:


Commit 7cc3a03fee40c0214ca28c0fd56686928137a55b in karaf's branch 
refs/heads/master from Nelson Antunes
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=7cc3a03 ]

[KARAF-6501] Restoring the wiring of fragment bundles with multiple hosts


> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ bin/karaf
> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] 
> DEBUG : Handler for protocols [wrap] started
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Starting the host 1
> Starting the host 2
> Starting the host 3
> {noformat}
> *7. Check that the fragment is no longer correctly attached to all three 
> hosts, but just to one*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2019-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17005141#comment-17005141
 ] 

ASF subversion and git services commented on KARAF-6501:


Commit 34ed60c1c53ed7e7762a8ac7b43091001c069e4b in karaf's branch 
refs/heads/master from Jean-Baptiste Onofré
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=34ed60c ]

[KARAF-6501] This closes #979


> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ bin/karaf
> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] 
> DEBUG : Handler for protocols [wrap] started
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Starting the host 1
> Starting the host 2
> Starting the host 3
> {noformat}
> *7. Check that the fragment is no longer correctly attached to all three 
> hosts, but just to one*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2019-12-29 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17005142#comment-17005142
 ] 

ASF GitHub Bot commented on KARAF-6501:
---

asfgit commented on pull request #979: [KARAF-6501] Restoring the wiring of 
fragment bundles with multiple hosts
URL: https://github.com/apache/karaf/pull/979
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.3.0, 4.2.8
>
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ bin/karaf
> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] 
> DEBUG : Handler for protocols [wrap] started
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Starting the host 1
> Starting the host 2
> Starting the host 3
> {noformat}
> *7. Check that the fragment is no longer correctly attached to all three 
> hosts, but just to one*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KARAF-6501) Restoring the wiring of fragment bundles with multiple hosts

2019-10-30 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16963585#comment-16963585
 ] 

ASF GitHub Bot commented on KARAF-6501:
---

nantunes commented on pull request #979: [KARAF-6501] Restoring the wiring of 
fragment bundles with multiple hosts
URL: https://github.com/apache/karaf/pull/979
 
 
   Details in https://jira.apache.org/jira/browse/KARAF-6501.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Restoring the wiring of fragment bundles with multiple hosts
> 
>
> Key: KARAF-6501
> URL: https://issues.apache.org/jira/browse/KARAF-6501
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.7
>Reporter: Nelson Antunes
>Priority: Major
> Attachments: example-1.0-SNAPSHOT.kar
>
>
> The {{StoredWiringResolver}}'s bundle wiring cache assumes each requirement 
> is only wired to a single capability. This isn't true for 
> {{osgi.wiring.host}} requirements as fragments can attach to multiple hosts.
> It is storing only the last wiring it comes across, resulting in the loss of 
> the other wirings when booting with hot caches.
> Steps to reproduce:
>  *1. Start a clean karaf*
> {noformat}
> $ bin/karaf
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State  │ Lvl │ Version │ Name
> 22 │ Active │  80 │ 4.2.7   │ Apache Karaf :: OSGi Services :: Event
> {noformat}
> *2. Install a fragment bundle and install and start two or more bundles that 
> satisfies the fragment's Fragment-Host requirement*
>  You can use the attached {{example-1.0-SNAPSHOT.kar}} file. Put it in the 
> {{deploy}} folder and it will install a fragment bundle and three hosts:
> {noformat}
> Starting the host 2
> Starting the host 1
> Starting the host 3
> {noformat}
> *3. Check that the bundles are correctly installed and the fragment is 
> attached to all three hosts*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 47, 46, 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle, Fragments: 44
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle, Fragments: 44
> {noformat}
> *4. However, notice that the wiring cache of the fragment bundle (44) isn't 
> right*
> {noformat}
> $ cat data/cache/bundle0/wiring/44
> osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
> 0; version=[1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0]
> osgi.wiring.host; (&(osgi.wiring.host=our-host)(bundle-version>=0.0.0))
> 45
> {noformat}
> *5. Stop karaf*
> {noformat}
> karaf@root()> ^D
> Stopping the host 3
> Stopping the host 2
> Stopping the host 1
> {noformat}
> *6. Start karaf with hot caches*
> {noformat}
> $ bin/karaf
> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] 
> DEBUG : Handler for protocols [wrap] started
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>   Apache Karaf (4.2.7)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Starting the host 1
> Starting the host 2
> Starting the host 3
> {noformat}
> *7. Check that the fragment is no longer correctly attached to all three 
> hosts, but just to one*
> {noformat}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State│ Lvl │ Version│ Name
> 22 │ Active   │  80 │ 4.2.7  │ Apache Karaf :: OSGi Services :: Event
> 44 │ Resolved │  80 │ 1.0.0.SNAPSHOT │ fragment Bundle, Hosts: 45
> 45 │ Active   │  80 │ 1.0.0  │ host1 Bundle, Fragments: 44
> 46 │ Active   │  80 │ 1.5.0  │ host2 Bundle
> 47 │ Active   │  80 │ 2.0.0  │ host3 Bundle
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)