felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Ždila <m.zd...@gmail.com>
Subject strange package wiring
Date Mon, 20 May 2013 10:18:21 GMT
Hello

I am using Apache Felix 4.2.1.

I have two bundles that export package org.osgi.service.cm:

1. bundle 89 (osgi.cmpn) exports package org.osgi.service.cm of version
1.4.0
2. bundle 75 (org.apache.felix.configadmin) exports package
org.osgi.service.cm of version 1.5.0

After I start framework, all imports of org.osgi.service.cm will resolve to
2, but one resolves to 1:

1:
g! inspect cap osgi.wiring.package 89
osgi.cmpn [89] provides:
...
osgi.wiring.package; org.osgi.service.cm 1.4.0 required by:
   org.apache.aries.jmx.core [72]
...

2:
g! inspect cap osgi.wiring.package 75
org.apache.felix.configadmin [75] provides:
-------------------------------------------
osgi.wiring.package; org.apache.felix.cm 1.0.0 [UNUSED]
osgi.wiring.package; org.apache.felix.cm.file 1.0.0 [UNUSED]
osgi.wiring.package; org.osgi.service.cm 1.5.0 required by:
   gofer-web [300]
   gofer-mongodb-connector [205]
   gofer-configurationAdmin-commandlineAdapter [136]
   gofer-crypto [143]
   gofer-web-jetty [296]
   gofer-logging-appenders [171]
   gofer-configurationAdminManager [141]
   org.apache.felix.scr [82]
   gofer-cluster-util [135]
   org.apache.felix.eventadmin [76]
   gofer-configurationAdminManager-api [137]
   gofer-database-datasource-c3p0 [144]
   gofer-monitor-collector [210]

Bundle 72 (org.apache.aries.jmx.core) requires:

g! inspect req osgi.wiring.package 72
org.apache.aries.jmx.core [72] requires:
...
osgi.wiring.package;
(&(osgi.wiring.package=org.osgi.service.cm)(version>=1.3.0))
resolved by:
   osgi.wiring.package; org.osgi.service.cm 1.4.0 from osgi.cmpn [89]


After I do "refresh 72" (bundle org.apache.aries.jmx.core) then requirement
changes from 1 to 2:

g! inspect req osgi.wiring.package 72
org.apache.aries.jmx.core [72] requires:
osgi.wiring.package;
(&(osgi.wiring.package=org.osgi.service.cm)(version>=1.3.0))
resolved by:
   osgi.wiring.package; org.osgi.service.cm 1.5.0 from
org.apache.felix.configadmin [75]

After framework restart the dependency is reset back to 1.

Is it normal operation? I thought that framework uses automatically highest
usable version of the exported package to satisfy imports without any
manual refresh. Is it a bug? If not, how to make it to use second wiring
without manual refresh?

Thanks in advance

-- 
Ing. Martin Ždila
tel:+421-908-363-848
mailto:martin@zdila.sk
http://www.zdila.sk/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message