felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: doubt...
Date Fri, 06 May 2011 14:12:20 GMT
On 5/6/11 6:33, Juan Arias wrote:
> First of all, greetings and congrats for the hard work
>
> My doubt:
> I'm using ipojo annotations to build a sort of modular web application, so I
> have to deal with "session" stuff,
> what I'm doing right now is using a Factory of a given name to create
> instances for each new session created
>
> @Requires(name="webappFactory")
> Factory webapp;
>
> is there a means of via API obtain the factory for a certain Component??
> Something like:
>
> Factory factory = XXX.getFactoryFor(String name);
>
> my problem is on session cleaning, when session is cleared I need to harvest
> all created Instances of such session
> and dispose them...

You are talking about iPOJO component factories, right?

They are all registered in the service registry with the service.pid 
property equal to the factory name, which is the name of the component 
class by default or the name you explicitly specify in your component 
declaration. So, you can always use the OSGi API to look them up.

-> richard

> Thanks!!!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message