cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Re: Spring - conf/applicationContext.xml | global bean definitions
Date Mon, 29 May 2006 17:28:17 GMT
Carsten Ziegeler wrote:
> Carsten Ziegeler wrote:
>>Reinhard Poetz wrote:
>>>ok. Than I will try to use the standard Spring way:
>>>   <param-name>contextConfigLocation</param-name>
>>>   <param-value>/WEB-INF/applicationContext.xml</param-value>
>>>in the cocoon-22-webapp-archetype but I guess this will not work together with

>>>paranoid classloading and the reloading classloader because the listener is 
>>>declared outside of Cocoon.
>>Yes, I noticed this problem as well. Unfortunately, listeners can't have
>>any parameters, so we can't provide a wrapper here (which is bad). We
>>could provide our own Spring-paranoid-contextloaderlistener, but I'm not
>>sure if this is a good idea?
> What do you think, if we provide our own listener which gets a
> configuration parameter from the servlet context and this parameter
> contains all listener classes, so we rewrite:
> <listener>
>   <listener-class>packagea.classa</listener-class>
>   <listener-class>packageb.classb</listener-class>
> </listener>
> to
> <context-param>
>   <param-name>o.a.c.OurListener</param-name>
>   <param-value>packagea.classa,packageb.classb</param-value>
> </context-param>
> <listener>
>   <listener-class>o.a.c.OurListener</listener-class>
> </listener>

hmm, yes, this could be a general solution for people that want to add their own 
listeners without losing the possibility of using the paranoid classloader and 
the reloading classloader.

Just for Spring I prefer adding

<include-beans src="WEB-INF/applicationContext.xml"/>

to cocoon.xconf.
Is there any advantage of using a listener instead of adding beans via 

Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}



Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:

View raw message