Thanks Neil for the suggestions.

> Not really. The problem is this part: "FooClient is created as
> required". When is that exactly?

I mean that Component activate method should be invoked only when any other
bundle class performs a lookup for Foo service

> component is not a service then there is no such signal, so DS is
> forced to immediately activate the component.

Yes that is the problem. Is it possible for component to say that I can
provide Foo service without using @Service annotation.

The problem is the Foo.class is not an interface hence I cannot proxy it
(easily). The Component support used here is more like Factory pattern to
create a class instance which cannot be instantiated directly by the
container as i need to set some properties on FooClient before registering
it.

So to put it simple - Is it possible to use lazy activation for servies are
created using a factory class and are not created directly by container?

Chetan Mehrotra

Reply via email to