cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: [2.2] New processor interface/approach
Date Thu, 13 Jul 2006 07:43:49 GMT
Daniel Fagerstrom wrote:
> Here I also would like to advertise a neat pattern (the whiteboard 
> pattern) that we use in the OSGi-blocks architecture, that we maybe 
> could use without OSGi in 2.2.
> 
> So, in the block architecture we set up a BlockServlet (or other 
> controllers) as a managed component by using the declarative services, 
> this could be done in Spring instead. Anyway, the configuration contains 
> a default mount path that can be overridden by the configuration 
> service. Then the component that corresponds to the MountTableProcessor 
> can ask the service manager for all services that implements Servlet and 
> that also has a mount path property. And it can mount these servlets 
> without any global configurations at all. It also allows for dynamic 
> installation/uninstallation/update of the servlets, but that is another 
> story ;)
> 
> Maybe we could use the same pattern with Spring managed processors. Is 
> there any way to ask the container for all beans that implements a 
> certain interface? It would make it possible to just deploy a block 
> without needing to update any mount tables.
> 
Yes, that's possible. You can add bean factory post processors (which
are spring beans as well) which gets notified by all beans, or you can
access all beans that implement a certain interface by asking the bean
factory for it.

Using the whiteboard pattern here sounds really good. I hope to come up
with an implementation in the next days.

Carsten
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Mime
View raw message