Carsten Ziegeler wrote:

Leszek Gawron wrote:


<map:components>
<datasources>
<jdbc name="local-ds">
<url>jdbc:blah</url>
</jdbc>
</datasources>
</map:components>


WOW SHIT ! :)
Couldn't express it better. Right now I am also using Hibernate but at my XSP times when XConfToolTask was too much for me, configuring cocoon.xconf by hand everytime I upgraded was a real nightmare.




Don't want to spoil the party here, but this is imho not a guaranteed
feature of the sitemap. It works now, but never was intended to be
possible. It accidentally sneaked into the code :(



You're absolutely right, Carsten. This wasn't possible with the compiled sitemap engine, and is possible - although not official - with the TreeProcessor because <map:components> in a sitemap is handled exactly as <cocoon> in cocoon.xconf.


Hence, any component declaration can be add there. Selectors also inherit their parent components, meaning in my example we add a datasource, but any datasource defined in cocoon.xconf or even parent sitemaps are available.

We *can* make this officially but this requires a vote. For example, the new tree processor orginally written for 2.2 (using Fortress) did imho not support this.



Don't know if it does support it now, but adding it would be IMO fairly easy.


Now I'm all of course for making this official, furthermore considering that blocks will need more than just sitemap components.

Ready to start a vote?

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Reply via email to