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 C0A6F10994 for ; Thu, 25 Apr 2013 19:27:22 +0000 (UTC) Received: (qmail 87415 invoked by uid 500); 25 Apr 2013 19:27:21 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 87371 invoked by uid 500); 25 Apr 2013 19:27:21 -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 87349 invoked by uid 99); 25 Apr 2013 19:27:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 19:27:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of heavy@ungoverned.org designates 209.85.219.53 as permitted sender) Received: from [209.85.219.53] (HELO mail-oa0-f53.google.com) (209.85.219.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 19:27:15 +0000 Received: by mail-oa0-f53.google.com with SMTP id m6so3246933oag.12 for ; Thu, 25 Apr 2013 12:26:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=i5o344eU0ASrVJ47T2Ge6AekMEyfmJsRsBSAbzj4W58=; b=lECHjxU3o+kWqCJiOT4Sgn0V1zhxus/OPmGGKTsQMW2qJjolq8P9wVSWYZqFcsKuoe yvprF+iyQkPMekw4H3Jswn4yOhyMAo6hxZn5+YFQNoIRmYukrjDWXVRYE386qK6z8dKt 8W+1qleEOV1I6KyFyx/whYS2PVr6EHehAPIR+H0IfxtA+pi9TUtvCuLOgrv9AolrCWDa cqvc+9eBcYEkX0Mkzfvzu5By5vJJnF66nFmJbIWHfNnraNYxg3ke8NsErBSO5AyKCAbB TNiMhUI5nfOzbOMHVYDq1pnR6SkvfsHQNCqxGgal9s1TNakP3NKHZd7jI/wGc3aDhvFp wefQ== X-Received: by 10.60.34.167 with SMTP id a7mr17084999oej.20.1366918013825; Thu, 25 Apr 2013 12:26:53 -0700 (PDT) Received: from old-imac.local ([12.43.212.162]) by mx.google.com with ESMTPSA id fl7sm4597261obb.0.2013.04.25.12.26.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 12:26:52 -0700 (PDT) Message-ID: <5179837A.8010605@ungoverned.org> Date: Thu, 25 Apr 2013 15:26:50 -0400 From: "Richard S. Hall" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: users@felix.apache.org Subject: Re: [iPOJO] constructor with BundleContext issue References: <1366917552.28821.YahooMailNeo@web161306.mail.bf1.yahoo.com> In-Reply-To: <1366917552.28821.YahooMailNeo@web161306.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnvXSp6Vy7F8BLHryKk3VrFwnnjlOv4hKn6msl9uIykrZyhcv8+ke31sHLQlrJ5xiYuXK6e X-Virus-Checked: Checked by ClamAV on apache.org If I recall, you have your own build system...are you importing the org.osgi.framework package in your bundle? -> richard On 4/25/13 15:19 , Michiel Vermandel wrote: > Hi, > > I have a simple pojo annotated with iPOJO. > > This works: > > package com.ce.flowbeans.impl; > > import org.apache.felix.ipojo.annotations.Component; > import org.apache.felix.ipojo.annotations.Instantiate; > import org.apache.felix.ipojo.annotations.Provides; > import org.apache.felix.ipojo.annotations.Validate; > > import com.ce.flowbeans.spi.FlowAdmin; > > @Component > @Instantiate > @Provides > public class FlowAdminImpl implements FlowAdmin { > > public FlowAdminImpl(){ > System.out.println("Instantiated"); > } > > @Override > public void sayHello() { > System.out.println("I say hello"); > } > > @Validate > public void starts(){ > System.out.println("Started"); > } > > } > > I get > > > Instantiated > Started > > > But when I use a constructor with the BundleContext, the component is not instantiated nor started. > It is also not listed in the iPOJO instances: > > package com.ce.flowbeans.impl; > > import org.apache.felix.ipojo.annotations.Component; > import org.apache.felix.ipojo.annotations.Instantiate; > import org.apache.felix.ipojo.annotations.Provides; > import org.apache.felix.ipojo.annotations.Validate; > import org.osgi.framework.BundleContext; > > import com.ce.flowbeans.spi.FlowAdmin; > > @Component > @Instantiate > @Provides > public class FlowAdminImpl implements FlowAdmin { > > public FlowAdminImpl(BundleContext context){ > System.out.println("Instanciated"); > } > > @Override > public void sayHello() { > System.out.println("I say hello"); > } > > @Validate > public void starts(){ > System.out.println("Started"); > } > > } > > what can be the cause of this? > > Thanks! > > > ----------------- > http://www.codessentials.com - Your essential software, for free! > Follow us at http://twitter.com/#!/Codessentials --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org