Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6757E200C14 for ; Tue, 7 Feb 2017 08:48:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 65FC2160B4B; Tue, 7 Feb 2017 07:48:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 89127160B3E for ; Tue, 7 Feb 2017 08:48:48 +0100 (CET) Received: (qmail 42823 invoked by uid 500); 7 Feb 2017 07:48:47 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 42810 invoked by uid 99); 7 Feb 2017 07:48:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 07:48:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 12930C0E29 for ; Tue, 7 Feb 2017 07:48:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id U6adJMH3GJWv for ; Tue, 7 Feb 2017 07:48:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7EF245FB43 for ; Tue, 7 Feb 2017 07:48:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 03548E03A1 for ; Tue, 7 Feb 2017 07:48:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A2A4F2528B for ; Tue, 7 Feb 2017 07:48:41 +0000 (UTC) Date: Tue, 7 Feb 2017 07:48:41 +0000 (UTC) From: "Guillaume Nodet (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KARAF-4980) OSGi framework capabilities: add all services MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 07 Feb 2017 07:48:49 -0000 [ https://issues.apache.org/jira/browse/KARAF-4980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855498#comment-15855498 ] Guillaume Nodet commented on KARAF-4980: ---------------------------------------- It would be nice to add the karaf service: {code} org.osgi.framework.system.capabilities= \ ${eecap-${java.specification.version}}, \ ${${karaf.framework}-capabilities}, \ osgi.service;effective:=active;objectClass=org.apache.karaf.info.ServerInfo {code} I also think the {{DebugOptionsListener}} should not be listed as they are not supposed to be used, they're part of a whiteboard pattern. Although, I suppose the {{Location}} services are only usefull if given with the {{type}} attribute: {code} osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.user.area, \ osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.instance.area, \ osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.configuration.area, \ osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.install.area, \ osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=eclipse.home.location, \ {code} I think other non standard attributes should be kept: {code} osgi.service;effective:=active;objectClass=java.lang.ClassLoader;equinox.classloader.type=contextClassLoader, \ osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource", \ osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi {code} Anyway, I came up with this small script that can be run in the console: {code} each (($.context bundle 0) registeredServices) { ref = $it msg = "osgi.service;effective:=active;" classes = new ArrayList each ($ref getProperty objectClass) { $classes add $it } nbClasses = ($classes size) if { %(nbClasses > 1) } { msg = "${msg}objectClass:List=\\"${(j:,:)classes}\\"" } { cls = ($classes get 0) msg = "${msg}objectClass=${cls}" } each ($ref getPropertyKeys) { if { $it startsWith "service." } { continue } if { $it equals "objectClass" } { continue } key = $it val = ($ref getProperty $key) if { "$val" startsWith "[" } { msg = "${msg};${key}:List=\\"${(j:,:)val}\\"" } { msg = "${msg};${key}=${val}" } } echo $msg } {code} Here's the trimmed and sorted output in the equinox case: {code} osgi.service;effective:=active;objectClass=java.lang.ClassLoader;equinox.classloader.type=contextClassLoader 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.osgi.framework.log.FrameworkLog osgi.service;effective:=active;objectClass=org.eclipse.osgi.framework.log.FrameworkLog;performance=true osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=eclipse.home.location osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.configuration.area osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.install.area osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.instance.area osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.datalocation.Location;type=osgi.user.area osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.debug.DebugOptions 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:List="org.osgi.service.log.LogReaderService,org.eclipse.equinox.log.ExtendedLogReaderService" osgi.service;effective:=active;objectClass:List="org.osgi.service.log.LogService,org.eclipse.equinox.log.ExtendedLogService" osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi osgi.service;effective:=active;objectClass=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource" 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.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 {code} > 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)