You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2011/06/28 10:29:56 UTC
[C3] Cocoon Spring Configurator, sitemap reload and exception unroll
Gents,
Cocoon 3 is using Cocoon Spring Configurator 2.1[1]; by default this is
triggered by an empty
<configurator:settings/>
in main applicationContext.xml.
In my project I need to:
1. always reload sitemap.xmap from the filesystem during development
2. catch the real cause of a ProcessingException (I was inspired by [2])
Hence I set something like as
<configurator:settings>
<configurator:property name="org.apache.cocoon.reloading.sitemap"
value="true"/>
<configurator:property
name="org.apache.cocoon.exception.ProcessingException.unroll" value="true"/>
</configurator:settings>
Then, I modified [3] and [4] in order to handle this kind of
configuration: the patch is attached to this e-mail.
Do you think this could be useful in general? If so I would commit gladly.
Cheers.
[1]
http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/2.1/1304_1_1.html
[2] http://cocoon.apache.org/2.2/core-modules/core/2.2/1379_1_1.html
[3]
cocoon-servlet/src/main/java/org/apache/cocoon/servlet/XMLSitemapServlet.java
[4]
cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/InvocationImpl.java
--
Francesco Chicchiriccò
Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/
Re: [C3] Cocoon Spring Configurator, sitemap reload and exception
unroll
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 29/06/2011 00:34, Reinhard Pötz wrote:
> On 06/28/2011 10:29 AM, Francesco Chicchiriccò wrote:
>> Gents,
>> Cocoon 3 is using Cocoon Spring Configurator 2.1[1]; by default this is
>> triggered by an empty
>>
>> <configurator:settings/>
>>
>> in main applicationContext.xml.
>>
>> In my project I need to:
>> 1. always reload sitemap.xmap from the filesystem during development
>
> Am I right that you use C3 within a Wicket application and can't use
> the "default" reloading classloader stuff based on the Cocoon Maven
> Plugin (mvn cocoon:prepare)?
Actually not: I gave up in using the cocoon-sample-wicket-webapp as a
base for my application because of the missing "servlet:/" feature.
I need the reloading feature that a block has (thanks to the Cocoon
Maven Plugin) but I also want to build a webapp that can be overlayed.
If I understood well, the cocoon-sample / cocoon-sample-webapp pair does
not meet these needs barely because the cocoon-sample-webapp is an empty
shell for cocoon-sample. Hence, if you overlay a WAR produced by
cocoon-sample-webapp, you can't handle into the sitemap stuff.
This is the reason why I am building my project (a Cocoon3-based
framework for delivering content managed by the enterprise Hippo CMS -
http://forge.onehippo.org/gf/project/hct/) as a maven WAR artifact with
more or less the same "developer-friendly" features that a block has.
Basically, my META-INF/cocoon/spring/servlet-service.xml declares the
XMLSitemapServlet as the following:
<bean name="org.onehippo.forge.hct.service" class="org.apache.cocoon.servlet.XMLSitemapServlet">
<servlet:context mount-path="" context-path="classpath:/COB-INF/"/>
</bean>
>> 2. catch the real cause of a ProcessingException (I was inspired by [2])
>
> yes, makes sense.
>
>> Hence I set something like as
>>
>> <configurator:settings>
>> <configurator:property name="org.apache.cocoon.reloading.sitemap"
>> value="true"/>
>> <configurator:property
>> name="org.apache.cocoon.exception.ProcessingException.unroll"
>> value="true"/>
>> </configurator:settings>
>>
>> Then, I modified [3] and [4] in order to handle this kind of
>> configuration: the patch is attached to this e-mail.
>>
>> Do you think this could be useful in general? If so I would commit
>> gladly.
>
> If my "C3 within Wicket" assumption is right, I'm fine with your
> suggestions.
What do you think, then?
Thanks.
--
Francesco Chicchiriccò
Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/
Re: [C3] Cocoon Spring Configurator, sitemap reload and exception
unroll
Posted by Reinhard Pötz <re...@apache.org>.
On 06/28/2011 10:29 AM, Francesco Chicchiriccò wrote:
> Gents,
> Cocoon 3 is using Cocoon Spring Configurator 2.1[1]; by default this is
> triggered by an empty
>
> <configurator:settings/>
>
> in main applicationContext.xml.
>
> In my project I need to:
> 1. always reload sitemap.xmap from the filesystem during development
Am I right that you use C3 within a Wicket application and can't use the
"default" reloading classloader stuff based on the Cocoon Maven Plugin
(mvn cocoon:prepare)?
> 2. catch the real cause of a ProcessingException (I was inspired by [2])
yes, makes sense.
>
> Hence I set something like as
>
> <configurator:settings>
> <configurator:property name="org.apache.cocoon.reloading.sitemap"
> value="true"/>
> <configurator:property
> name="org.apache.cocoon.exception.ProcessingException.unroll"
> value="true"/>
> </configurator:settings>
>
> Then, I modified [3] and [4] in order to handle this kind of
> configuration: the patch is attached to this e-mail.
>
> Do you think this could be useful in general? If so I would commit gladly.
If my "C3 within Wicket" assumption is right, I'm fine with your
suggestions.
--
Reinhard Pötz Founder & Managing Director, Indoqa and Deepsearch
http://www.indoqa.com/people/reinhard-poetz.html
Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member reinhard@apache.org
________________________________________________________________________
Furthermore, I think Oracle has to honor the JSPA agreement.
http://s.apache.org/JCPIsDead http://s.apache.org/tck-trap