0

I have application that embeds Felix. Now I'm trying to leverage iPOJO. For this purpose I've created consumer, that have following declaration:

@Component
@Instantiate
public class YetAnotherConsumer {
    @Requires(specification = "lookup.Lookup")
    List<Lookup> allLookups;

Everything is compiled by ant task <ipojo ....

All examples of iPOJO assumes that my application is started under felix console. But (once again) my application embeds felix. So my question how to resolve instance of YetAnotherConsumer?

EDITED Answering @Neil question, per iPOJO documentation:

@Instantiate

Goal: declare a simple instance (this is equivalent to <instance component="..."> </instance>

I suppose that combination of iPOJO and Felix will create instance of mine YetAnotherConsumer. So my question is how my application can access this instance?

EDITED 2 I've placed logging to constructor of YetAnotherConsumer so I can see that this one is not invoked. This arises another question - how to initiate iPOJO, my felix is started as follow:

m_felix = new Felix(configMap);
m_felix.start();

What is missed to start iPOJO engine?

Community
  • 1
  • 1
Dewfy
  • 23,277
  • 13
  • 73
  • 121
  • Please clarify your question. For example, what does "resolve" mean in this context? What are you trying to do? – Neil Bartlett Mar 23 '12 at 01:12
  • @Neil Bartlett - just edited post to answer you question – Dewfy Mar 23 '12 at 08:45
  • 1
    Thanks for the clarification. Why are you trying to access `YetAnotherConsumer`? It's a *consumer*. If it were to publish as a service (e.g. using the @Provide annotation) then you could access that service from your embedding application. But then it would be a *producer* rather than a consumer. – Neil Bartlett Mar 24 '12 at 01:07
  • 1
    To start the iPOJO "engine" you need to install and start the iPOJO bundle. – Neil Bartlett Mar 24 '12 at 01:07
  • @NeilBartlett "need to install" - how to do it from embedding perspective. How to write code that will register iPOJO in my application? – Dewfy Mar 26 '12 at 15:43

0 Answers0