Return-Path: X-Original-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 855CEEAF7 for ; Sun, 17 Feb 2013 20:12:09 +0000 (UTC) Received: (qmail 9214 invoked by uid 500); 17 Feb 2013 20:12:09 -0000 Delivered-To: apmail-incubator-celix-dev-archive@incubator.apache.org Received: (qmail 9181 invoked by uid 500); 17 Feb 2013 20:12:09 -0000 Mailing-List: contact celix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: celix-dev@incubator.apache.org Delivered-To: mailing list celix-dev@incubator.apache.org Received: (qmail 9169 invoked by uid 99); 17 Feb 2013 20:12:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2013 20:12:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pepijnnoltes@gmail.com designates 209.85.214.42 as permitted sender) Received: from [209.85.214.42] (HELO mail-bk0-f42.google.com) (209.85.214.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2013 20:12:03 +0000 Received: by mail-bk0-f42.google.com with SMTP id jk7so2280671bkc.1 for ; Sun, 17 Feb 2013 12:11:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=rg61RyBo4L4N713qDJ4a2QhW6SIyPCGvt0xjhOTmTFc=; b=dyDPESBFwndNQvj4uurcPQkoygJPVaccmEURtwe3/fqR3eG3rltnYjz7SysssXPEa2 D+o1TPVp1K1avbTAilrDN4ZkJhsjK8Aet9NM49rsnlsz8Xwp+269IGVDDtv8Gjt91hPu UU0awbJJPkBNC0PCYajKjdumPfiOBX1CX4/nXZ9RAjyxvlFLGylR7bDQ4SMBRncMqEsC 25gCcuusgoUzCnNgJcBAnebG0370tXpBEQ+11VANg0XhEwzU3h8m/UeDJl37A8JtFS9i zYathR5XPoMTmhqKZ1iApciXya4HeMkU2C6DM7R+GDi3+Qbgt91Fa1P9fzfpmo6SKjBo Ejbg== MIME-Version: 1.0 X-Received: by 10.204.148.9 with SMTP id n9mr3688892bkv.1.1361131901971; Sun, 17 Feb 2013 12:11:41 -0800 (PST) Received: by 10.204.36.15 with HTTP; Sun, 17 Feb 2013 12:11:41 -0800 (PST) In-Reply-To: <6c39c395e45adf1a3b975a888c3d5041@imap.sundevil.de> References: <6c39c395e45adf1a3b975a888c3d5041@imap.sundevil.de> Date: Sun, 17 Feb 2013 21:11:41 +0100 Message-ID: Subject: Re: framework uuid From: Pepijn Noltes To: celix-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=0015174be2e8826e0e04d5f1377f X-Virus-Checked: Checked by ClamAV on apache.org --0015174be2e8826e0e04d5f1377f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bjorn, On Fri, Feb 15, 2013 at 6:12 PM, Bj=F6rn Petri wr= ote: > > > Hi! > > I tried to get the celix framework uuid by using the following: > > /* get framework uuid */ > status =3D bundleContext_getProperty(bi->**context, > "endpoint.framework.uuid", &uuidStr) > > Unfortunately it does not work ;(. Does anyone have an idea how > to get the framework uuid? > The property endpoint.framework.uuid is used in the remote service admin, I think the property you are looking for is FRAMEWORK_UUID (org.osgi.framework.uuid). Apache Celix does not support this yet. I will try to add this in the coming days. In the meantime if you just need a unique id, you could also generate one with apr_utils. The endpoint.framework.uuid is generated in same way: celix_status_t remoteServicesUtils_getUUID(apr_pool_t *pool, BUNDLE_CONTEXT context, char **uuidStr) { celix_status_t status =3D CELIX_SUCCESS; status =3D bundleContext_getProperty(context, ENDPOINT_FRAMEWORK_UUID, uuidStr); if (status =3D=3D CELIX_SUCCESS) { if (*uuidStr =3D=3D NULL) { *uuidStr =3D apr_palloc(pool, APR_UUID_FORMATTED_LENGTH + 1); if (!*uuidStr) { status =3D CELIX_ENOMEM; } else { apr_uuid_t uuid; apr_uuid_get(&uuid); apr_uuid_format(*uuidStr, &uuid); setenv(ENDPOINT_FRAMEWORK_UUID, *uuidStr, 1); } } } return status; } I hope this helps. Greetings, Pepijn --0015174be2e8826e0e04d5f1377f--