Hi,

Do you mean like this:

package com.ce.flowbeans.core;

import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Instantiate;
import org.apache.felix.ipojo.annotations.Provides;

import com.ce.flowbeans.model.FlowAdmin;

@Component
@Instantiate
@Provides
public class FlowAdminImpl implements FlowAdmin {

    @Override
    public void sayHello() {
        System.out.println("I say hello ");
    }

}


It doesn't make any difference.
By the way I do not use bnd to build my bundles, but I think that shouldn't be 
a problem,right?

Thanks



 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


________________________________
 From: lessonz <[email protected]>
To: [email protected] 
Sent: Thursday, April 25, 2013 7:35 AM
Subject: Re: [iPOJO] @Provides class not detected
 

Perhaps you aren't instantiating it by way of metadata or the @Instantiate
annotation?
On Apr 24, 2013 10:44 PM, "Michiel Vermandel" <[email protected]> wrote:

> Hi,
>
> I'm new to iPOJO, so I hope I did not overlook the obvious.
> I created a simple bundle with one class that has the @Component an
> @Provides annotation, but it does not show up in iPOJO gogo arch .
>
> I installed iPOJO in Felix:
> START LEVEL 1
>    ID|State      |Level|Name
>     0|Active     |    0|System Bundle (4.0.3)
>     1|Active     |    1|Apache Felix Bundle Repository (1.6.6)
>     2|Active     |    1|Apache Felix Configuration Admin Service (1.6.0)
> ...
>    10|Active     |    1|Apache Felix iPOJO Annotations (1.8.6)
>    11|Active     |    1|Apache Felix iPOJO (1.8.6)
>    16|Active     |    1|Apache Felix iPOJO Gogo Command (1.0.1)
>
>
> My class:
>
> package com.ce.flowbeans.core;
>
> import org.apache.felix.ipojo.annotations.Component;
> import org.apache.felix.ipojo.annotations.Provides;
>
> import com.ce.flowbeans.model.FlowAdmin;
>
> @Component
> @Provides
> public class FlowAdminImpl implements FlowAdmin {
>
>     @Override
>     public void sayHello() {
>         System.out.println("I say hello");
>     }
>
> }
>
>
> After I created and installed the bundle into Felix I check with the iPOJO
> gogo "instances" command and I see this:
> ...
>    16|Active     |    1|Apache Felix iPOJO Gogo Command (1.0.1)
>    18|Active     |    1|FlowBeans Core (1.0.0.SNAPSHOT)
> g! instances
> Instance org.apache.felix.ipojo.IPOJOURLHandler-0 -> valid
> Instance org.apache.felix.ipojo.arch.gogo.Arch-0 -> valid
>
>
> but no com.ce.flowbeans.core.FlowAdminImpl.
>
> Am I forgetting anything?
>
> Thanks!
>
> Michiel
>
>
> -----------------
> http://www.codessentials.com - Your essential software, for free!
> Follow us at http://twitter.com/#!/Codessentials

Reply via email to