You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <lg...@mobilebox.pl> on 2006/09/05 13:31:59 UTC

Properties - on and on

Why are most properties residing in 
cocoon-webapp/src/main/webapp/WEB-INF/cocoon/properties instead of 
cocoon-core/src/main/resources/META-INF/properties? This way if anybody 
changes anything also both archetypes have to be updated.

After all we have property overrides and they do not even have to be 
generated by cocoon webapp archetype. The default properties should come 
from cocoon-core with the possibility to override in a particular cocoon 
mode.

I have introduced some new properties for managing continuations manager 
in the way I have described above [1]. If anybody is against - now's the 
time :)

[1] http://marc2.theaimsgroup.com/?l=xml-cocoon-cvs&m=115745582028279&w=2

-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Re: Properties - on and on

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
> 
> tricky question: which is the second one if both .xconfs reside in same 
> directory ? :)
> 
:) I'm not sure but I think I have added the code to apply them in
alphabetical order; but I'll check that, too.

Carsten

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

Re: Properties - on and on

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>>>> My kid interrupted me in the middle of commits. Just commited that to 
>>>> core. I am sorry for inconvinience.
> No problem.
> 
>>> Hmm I seem to removed the properties at 5pm. The power of distraction.
>>>
>>> I have also removed cocoon-core-sitemap.xmap from cocoon-webapp - seems 
>>> cocoon-core has been providing it also.
>>>
>>> Another question: assuming cocoon-core provides cocoon-core-sitemap.xmap 
>>> that among others defines pipes. I do also put some .xmap in 
>>> sitemap-additions which accidentaly also define pipes. Which definition 
>>> will be used? Or is it undetermined?
>>>
>> Just to clarify:
>> In sitemap-additions I have two files:
>>
>>
>> cocoon-core-sitemap.xmap (comes from cocoon-core) that has 26kB
>> c:\dev\apache-projects\cocoon-trunk\core\cocoon-core\src\main\resources\META-INF\legacy\sitemap-additions\cocoon-core-sitemap.xmap
>>
>> a second file cocoon-core-sitemap-small.xmap that is the same file 
>> ascocoon-trunk\tools\archetypes\cocoon-22-archetype-webapp\src\main\resources\archetype-resources\src\main\webapp\WEB-INF\cocoon\sitemap-additions\cocoon-core-sitemap.xmap
>>
>> Every of those files defines default generators/transformers/etc.
>> Both define pipes (differently).
>>
>> Why does nothing break even if there are two xslt transformers and so on?
>>
> You can override component definitions - so the second definition
> overrides the first one. This mechanism is intended for the
> roles/components handling: you first define a role with an optional
> default class and can then override this in xconf. I'll have a look why
> it doesn't throw an exception if the component is defined twice.

tricky question: which is the second one if both .xconfs reside in same 
directory ? :)

-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Re: Properties - on and on

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
>>> My kid interrupted me in the middle of commits. Just commited that to 
>>> core. I am sorry for inconvinience.
No problem.

>> Hmm I seem to removed the properties at 5pm. The power of distraction.
>>
>> I have also removed cocoon-core-sitemap.xmap from cocoon-webapp - seems 
>> cocoon-core has been providing it also.
>>
>> Another question: assuming cocoon-core provides cocoon-core-sitemap.xmap 
>> that among others defines pipes. I do also put some .xmap in 
>> sitemap-additions which accidentaly also define pipes. Which definition 
>> will be used? Or is it undetermined?
>>
> Just to clarify:
> In sitemap-additions I have two files:
> 
> 
> cocoon-core-sitemap.xmap (comes from cocoon-core) that has 26kB
> c:\dev\apache-projects\cocoon-trunk\core\cocoon-core\src\main\resources\META-INF\legacy\sitemap-additions\cocoon-core-sitemap.xmap
> 
> a second file cocoon-core-sitemap-small.xmap that is the same file 
> ascocoon-trunk\tools\archetypes\cocoon-22-archetype-webapp\src\main\resources\archetype-resources\src\main\webapp\WEB-INF\cocoon\sitemap-additions\cocoon-core-sitemap.xmap
> 
> Every of those files defines default generators/transformers/etc.
> Both define pipes (differently).
> 
> Why does nothing break even if there are two xslt transformers and so on?
> 
You can override component definitions - so the second definition
overrides the first one. This mechanism is intended for the
roles/components handling: you first define a role with an optional
default class and can then override this in xconf. I'll have a look why
it doesn't throw an exception if the component is defined twice.

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

Re: Properties - on and on

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Leszek Gawron wrote:
> Leszek Gawron wrote:
>> Carsten Ziegeler wrote:
>>> Leszek Gawron wrote:
>>>> Ok. I am going to follow what you said and migrate all possible 
>>>> properties to core.
>>>>
>>> Did you remove the properties for the settings with your last commits? I
>>> can't find any properties for logging, reloading etc.
>> My kid interrupted me in the middle of commits. Just commited that to 
>> core. I am sorry for inconvinience.
> Hmm I seem to removed the properties at 5pm. The power of distraction.
> 
> I have also removed cocoon-core-sitemap.xmap from cocoon-webapp - seems 
> cocoon-core has been providing it also.
> 
> Another question: assuming cocoon-core provides cocoon-core-sitemap.xmap 
> that among others defines pipes. I do also put some .xmap in 
> sitemap-additions which accidentaly also define pipes. Which definition 
> will be used? Or is it undetermined?
> 
Just to clarify:
In sitemap-additions I have two files:


cocoon-core-sitemap.xmap (comes from cocoon-core) that has 26kB
c:\dev\apache-projects\cocoon-trunk\core\cocoon-core\src\main\resources\META-INF\legacy\sitemap-additions\cocoon-core-sitemap.xmap

a second file cocoon-core-sitemap-small.xmap that is the same file 
ascocoon-trunk\tools\archetypes\cocoon-22-archetype-webapp\src\main\resources\archetype-resources\src\main\webapp\WEB-INF\cocoon\sitemap-additions\cocoon-core-sitemap.xmap

Every of those files defines default generators/transformers/etc.
Both define pipes (differently).

Why does nothing break even if there are two xslt transformers and so on?

-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Re: Properties - on and on

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Leszek Gawron wrote:
> Carsten Ziegeler wrote:
>> Leszek Gawron wrote:
>>> Ok. I am going to follow what you said and migrate all possible 
>>> properties to core.
>>>
>> Did you remove the properties for the settings with your last commits? I
>> can't find any properties for logging, reloading etc.
> My kid interrupted me in the middle of commits. Just commited that to 
> core. I am sorry for inconvinience.
Hmm I seem to removed the properties at 5pm. The power of distraction.

I have also removed cocoon-core-sitemap.xmap from cocoon-webapp - seems 
cocoon-core has been providing it also.

Another question: assuming cocoon-core provides cocoon-core-sitemap.xmap 
that among others defines pipes. I do also put some .xmap in 
sitemap-additions which accidentaly also define pipes. Which definition 
will be used? Or is it undetermined?

-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Re: Properties - on and on

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>> Ok. I am going to follow what you said and migrate all possible 
>> properties to core.
>>
> Did you remove the properties for the settings with your last commits? I
> can't find any properties for logging, reloading etc.
My kid interrupted me in the middle of commits. Just commited that to 
core. I am sorry for inconvinience.

-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Re: Properties - on and on

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
> Ok. I am going to follow what you said and migrate all possible 
> properties to core.
> 
Did you remove the properties for the settings with your last commits? I
can't find any properties for logging, reloading etc.

Carsten

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

Re: Properties - on and on

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
>> Why are most properties residing in 
>> cocoon-webapp/src/main/webapp/WEB-INF/cocoon/properties instead of 
>> cocoon-core/src/main/resources/META-INF/properties? This way if anybody 
>> changes anything also both archetypes have to be updated.
>>
>> After all we have property overrides and they do not even have to be 
>> generated by cocoon webapp archetype. The default properties should come 
>> from cocoon-core with the possibility to override in a particular cocoon 
>> mode.
>>
> Yes, I agree - each block and this includes core should have their own
> properties defined in resources/META-INF/properties to give default
> values. So in the end, Cocoon can run without any additional property
> file from the user.
Ok. I am going to follow what you said and migrate all possible 
properties to core.


-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Re: Properties - on and on

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
> Why are most properties residing in 
> cocoon-webapp/src/main/webapp/WEB-INF/cocoon/properties instead of 
> cocoon-core/src/main/resources/META-INF/properties? This way if anybody 
> changes anything also both archetypes have to be updated.
> 
> After all we have property overrides and they do not even have to be 
> generated by cocoon webapp archetype. The default properties should come 
> from cocoon-core with the possibility to override in a particular cocoon 
> mode.
> 
Yes, I agree - each block and this includes core should have their own
properties defined in resources/META-INF/properties to give default
values. So in the end, Cocoon can run without any additional property
file from the user.

Carsten

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