Hmm. iPOJO is intended to be a component model for OSGi, so you are sort of wanting to go against the grain if you don't want to use services.

I understand your concern about overhead, but I think any system that manages your components' lifecycle is going to have to keep some registry of instances too, unless you have a purely static management framework that just creates instances once and forgets about them. Your request is essentially asking iPOJO to duplicate the service registry as some sort of hidden "component registry".

However, Clement and I did discuss this topic before for iPOJO, but I don't think anything was done here.

Maybe Clement has more to add.

-> richard

On 3/13/09 6:28 AM, Stéphane Amaudruz wrote:
Hi,



I think I am missing some point in iPOJO.



The use case is:

*         I have an interface, let’s say IRuleStrategy, that define
execution strategies for Rule.

*         I have different implementations: Strategy1 to execute Rule on
system version1 and Strategy2 to execute Rule on system version2.

*         I will create a singleton instance of each of these implementation
with IPOJO



Now in my ExecutionEngine I want to retrieve the strategy for a rule,
depending on a the system version, something as getStrategy(int version). I
do not see how to do that with IPOJO component? That means how to retrieve
are component from its interface and some properties.



The only solution I think about is that the component publishes an OSGi
service and then I can retrieve the service by properties. But can I avoid
it and requesting component instead of service, what are the best practices?
Is fear an overhead using services and also I am not confident about OSGi
service and multithreading ?



Thanks,

Steph









---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to