[
https://issues.apache.org/jira/browse/KARAF-4980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855565#comment-15855565
]
Markus Rathgeb commented on KARAF-4980:
---------------------------------------
{quote}
It would be nice to add the karaf service
{quote}
Done (I was not sure if this should be added to the system capabilities).
{quote}
Anyway, I came up with this small script that can be run in the console:
{quote}
Really great! It seems it is time to read about Karaf shell scripting.
I will update the PR soon.
Thanks for your support.
I realized (sorry, don't know why this has not seend before) now using the most
Karaf 4.1.0 distribution from Maven Central that if the Equinox framework is
used the most services are already part of "Provide-Capability" in the output
of "bundle:headers 0".
{noformat}
osgi.service;objectClass:List<String>="org.osgi.service.log.LogReaderService,
org.eclipse.equinox.log.ExtendedLogReaderService",
osgi.service;objectClass:List<String>="org.osgi.service.log.LogService,
org.eclipse.equinox.log.ExtendedLogService",
osgi.service;objectClass:List<String>=org.eclipse.osgi.framework.log.FrameworkLog,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.datalocation.Location;type=osgi.user.area,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.datalocation.Location;type=osgi.instance.area,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.datalocation.Location;type=osgi.configuration.area,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.datalocation.Location;type=osgi.install.area,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.datalocation.Location;type=eclipse.home.location,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.environment.EnvironmentInfo,
osgi.service;objectClass:List<String>=org.osgi.service.packageadmin.PackageAdmin,
osgi.service;objectClass:List<String>=org.osgi.service.startlevel.StartLevel,
osgi.service;objectClass:List<String>=org.osgi.service.permissionadmin.PermissionAdmin,
osgi.service;objectClass:List<String>=org.osgi.service.condpermadmin.ConditionalPermissionAdmin,
osgi.service;objectClass:List<String>=org.osgi.service.resolver.Resolver,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.debug.DebugOptions,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.urlconversion.URLConverter,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.localization.BundleLocalization,
osgi.service;objectClass:List<String>=org.eclipse.osgi.service.security.TrustEngine,
osgi.service;objectClass:List<String>=org.eclipse.osgi.signedcontent.SignedContentFactory,
{noformat}
Questions / remarks:
* adding the whole capabilities to the config.properties will result into two
entries (using bundle:headers 0) -- at least a little bit different, see below
* "effective:=active" is missing on the current output, so adding it to
config.properties will bring in the currently one and new ones with the
effective property (can you point me to some details about the effective flag
-- IIRC it is also used because it is ignored if set to active in some cases)
* if there are the two capabilities, the first without the performance property
and the second with the property, should we keep both?
**
"osgi.service;effective:=active;objectClass=org.eclipse.osgi.framework.log.FrameworkLog"
**
"osgi.service;effective:=active;objectClass=org.eclipse.osgi.framework.log.FrameworkLog;performance=true"
* the current list misses some properties for some services
* the current list misses some services at all
** java.lang.ClassLoader;equinox.classloader.type=contextClassLoader
** javax.xml.parsers.DocumentBuilderFactory
** javax.xml.parsers.SAXParserFactory
> OSGi framework capabilities: add all services
> ---------------------------------------------
>
> Key: KARAF-4980
> URL: https://issues.apache.org/jira/browse/KARAF-4980
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-core
> Affects Versions: 4.1.0
> Reporter: Markus Rathgeb
> Assignee: Guillaume Nodet
>
> The services provided by the Felix and the Equinox framework differs and
> should be provided by the system capabilities.
> I used service:list to find the services that are provided by Felix and the
> ones that are provided by Equinox.
> I would like to propagate this change to the config.properties (I will create
> a PR if you agree):
> {noformat}
> org.osgi.framework.system.capabilities= \
> ${eecap-${java.specification.version}}, \
> ${${karaf.framework}-capabilities}
> felix-capabilities= \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.packageadmin.PackageAdmin,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.resolver.Resolver,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.startlevel.StartLevel
> equinox-capabilities= \
> osgi.service;effective:=active;objectClass=java.lang.ClassLoader, \
>
> osgi.service;effective:=active;objectClass=javax.xml.parsers.DocumentBuilderFactory,
> \
>
> osgi.service;effective:=active;objectClass=javax.xml.parsers.SAXParserFactory,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.equinox.log.ExtendedLogReaderService,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.equinox.log.ExtendedLogService,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.framework.log.FrameworkLog,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.debug.DebugOptions,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.debug.DebugOptionsListener,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.environment.EnvironmentInfo,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.localization.BundleLocalization,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.security.TrustEngine,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.urlconversion.URLConverter,
> \
>
> osgi.service;effective:=active;objectClass=org.eclipse.osgi.signedcontent.SignedContentFactory,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.condpermadmin.ConditionalPermissionAdmin,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.log.LogReaderService,
> \
> osgi.service;effective:=active;objectClass=org.osgi.service.log.LogService, \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.packageadmin.PackageAdmin,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.permissionadmin.PermissionAdmin,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.resolver.Resolver,
> \
>
> osgi.service;effective:=active;objectClass=org.osgi.service.startlevel.StartLevel
> {noformat}
> The currently configuration also contains:
> {noformat}
> osgi.service;effective:=active;objectClass=org.osgi.service.url.URLHandlers
> {noformat}
> but this service is not listed by service:list.
> Is it still valid?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)