Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C62ABDB21 for ; Wed, 22 May 2013 14:31:03 +0000 (UTC) Received: (qmail 45599 invoked by uid 500); 22 May 2013 14:31:03 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 45338 invoked by uid 500); 22 May 2013 14:31:03 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 45083 invoked by uid 99); 22 May 2013 14:31:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 14:31:03 +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 (nike.apache.org: domain of lottwin@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; Wed, 22 May 2013 14:30:55 +0000 Received: by mail-bk0-f42.google.com with SMTP id jk13so1155686bkc.15 for ; Wed, 22 May 2013 07:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=cbwrxEuPsQ1L3X76NZuIuC8uyZv/sVKxRRiPoXUuD3I=; b=absxRI+c+9o5ZWY02y7cT0AtteYEOJh38d3P5sw2NOoUZ4HeM3w+jFtfukfcB3eh7I 3sJQ59cAdJZpCdjtEyDupGT3XEdpkijgpJyj+simJtQAVW+oYcTWN/AQvuWPtRMGrmE2 ok4AmezZZJXM4wdRuAfYrJWtSbzoNE8QkrowkttHZcEkXd4rln3Lqo2WKF8BJ5QDodIf qAwcrVOR7JK0yEocnbqBlkCUH2BqdzkIBhdP9hVr34qr0JbFz4Uek9Txzgl/EXXxUxi8 g5Ms6WJjbiqcOcgb3kwLUWx2C/Jh6uUXlITibt1U2E4BpFiI5TeDLMmyRnZZHGpW2yGI 8ehw== X-Received: by 10.205.36.138 with SMTP id ta10mr4036738bkb.4.1369233035130; Wed, 22 May 2013 07:30:35 -0700 (PDT) MIME-Version: 1.0 Sender: lottwin@gmail.com Received: by 10.205.114.134 with HTTP; Wed, 22 May 2013 07:30:04 -0700 (PDT) In-Reply-To: References: From: Snorre Lothar von Gohren Edwin Date: Wed, 22 May 2013 16:30:04 +0200 X-Google-Sender-Auth: 5lerPK1yoV8N8vqit2JuFxcBYBc Message-ID: Subject: Re: ServiceTracker problems To: users Content-Type: multipart/alternative; boundary=bcaec52995b9acac1c04dd4f68e1 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec52995b9acac1c04dd4f68e1 Content-Type: text/plain; charset=ISO-8859-1 Ahh thank you very much! It solved it. Do you mind explaining the reason for this? Im in the learning fase:) On Wed, May 22, 2013 at 4:25 PM, Chetan Mehrotra wrote: > Try to modify the addingService in TrackerImpl and instead of returning > null delegate the call to parent > > @Override > public Object addingService(ServiceReference ref) { > System.out.println("Added a service with snorre"); > button = new ServiceButton(ref); > button.addActionListener(new ButtonActionListener(frame, ref)); > frame.addToolBarButton(button); > frame.addServiceToList(ref.getBundle().getSymbolicName()); > return super.addingService(ref); > } > > That you get the expected flow working > > Chetan Mehrotra > > > On Wed, May 22, 2013 at 7:37 PM, Snorre Lothar von Gohren Edwin < > snorre.edwin@gmail.com> wrote: > > > Hi, im new to OSGi and using the felix framework. > > My code can be found here: > https://github.com/Snorlock/prosjektoppgavekode > > > > My problem is that the removedService method is never called when a > service > > is stopped. > > The servicetracker implementatition can be found here: > > > > > https://github.com/Snorlock/prosjektoppgavekode/tree/master/org.snorre.roadstation/src/org/snorre/roadstation/impl > > > > Im not using the customizer, just tried to use it to see if that solved > the > > problem. > > > > The activator can be found here: > > > > > https://github.com/Snorlock/prosjektoppgavekode/tree/master/org.snorre.roadstation/src/org/snorre/roadstation/internal > > > > And a service that is beeing registerd can be found here: > > > > > https://github.com/Snorlock/prosjektoppgavekode/tree/master/org.snorre.service.sign/src/org/snorre/sign/internal > > > > So the thing is that addedService is beeing called everytime the service > > bundle is started, but for some reason I cant get the removedService to > get > > called when I stop the service bundle. So basically my gui gets > repetative > > buttons because it never registers that a service is gone. > > > > I dont know what is wrong and dont know how to debug this. > > Im trying this maillist to see if someone might help. > > Thx in advance. > > > > > > -- > > Mvh > > Snorre Lothar von Gohren Edwin > > +47 411 611 94 > > > -- Mvh Snorre Lothar von Gohren Edwin +47 411 611 94 --bcaec52995b9acac1c04dd4f68e1--