cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: Restructuring directory structure[was [Vote] Block artifact directory structure]
Date Sun, 05 Nov 2006 16:53:20 GMT
Hash: SHA1

Leszek Gawron wrote:
> Giacomo Pati wrote:
>> Carsten Ziegeler wrote:
>>> Leszek Gawron wrote:
>>>>>> To get things going: how do I get access to current cocoon running
>>>>>> mode in:
>>>>>> - AvalonElementParser
>>>>>> - SitemapElementParser
>>>>>> in order to pass it to ConfigurationReader?
>>>>> It seems my knowledge of Spring internals is lacking alot. Reading the
>>>>> code I would say maybe somthing line
>>>>> (Settings)(new RuntimeBeanReference(Settings.ROLE).getSource())
>>>> probably not, I need to access the bean itself - not the definition
>>>> metadata. I do not know if that is possible - after all the context
>>>> containing the settings bean is still in creation.
>>> It's not possible to get the settings object in the element parser.
>>> Actually its not possible to access any bean in the parser (and its also
>>> not possible to get the ServletContext). I had a very hard time figuring
>>> a way out of this problem. And I came up with the current solution which
>>> registers special beans which do the work. So the parser only register
>>> beans, pass some configuration information to the beans, but the actual
>>> work is done in the beans when they are instantiated by Spring.
>> To go back to Leszeks initial question, so there is a
>> needed in those classes mentioned to get te running mode than?
> yes.. but I would rather use the Settings.getRunningMode() than to
> duplicate the logic that establishes running mode. With
> System.getProperty() we have the feature working in 2 minutes. Question
> is: will other developers agree to such "unprofessional" solution?

Thanks or qualifying my proposal as "unprofessional" :-)

I you cannot get a Setting object you only have the System.getProperty choice.

- --
Giacomo Pati
Otego AG, Switzerland -
Orixo, the XML business alliance -

Version: GnuPG v1.4.5 (GNU/Linux)


View raw message