Stefano Bagnara wrote:
Carsten Ziegeler ha scritto:
You might want to have a look at the Avalon-Spring bridge from the
Apache Cocoon project. This allows you to use Avalon/Excalibur
configurations and components as Spring beans - which is very
interesting if you already have used Avalon in the past and want to
reuse your stuff in Spring.
Hi Carsten,
in the JAMES project we also developed something similar to an
Avalon-Spring bridge. We most often call it a Spring based Avalon
container compatible with the Phoenix configuration.
It currently is 99% generic but at the moment is part of james main
source tree and includes a couple of things specific to james:
http://svn.apache.org/repos/asf/james/server/trunk/spring-deployment/
I searched for Avalon-Spring bridge from cocoon but I didn't find much
information: can you give me more detail (links?).
Hi Stefano,
in Cocoon we directly use Spring which means we read the Avalon
configurations and add the components as beans to a Spring container. We
have a spring bean post processor for Avalon components which calls the
Avalon lifecycle methods like configure(), dispose() etc.
You'll find the code at:
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon
Now, currently the code is a little bit tied to Cocoon, but it shouldn't
be hard to separate this from Cocoon - this is still on the todo list
for Cocoon anyway :)
We use the spring xml mechanism and define own xml elements, so you
simply use something like
<avalon:bridge location="someconffile.xml"/>
I think there is more in the bridge like automatically loading
configurations from jar files if they're put at a specific location etc.
But I wrote this code too long ago to actually remember all the details :)
The bridge is using the Cocoon Spring Configurator which is a nice
extension to Spring (and not tied to Cocoon):
http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1304_1_1.html
Maybe we can merge the Avalon-Spring bridge efforts with Cocoon, and
maybe the avalon website should provide some information about the tool,
WDYT?
Yes, I think this makes sense - imho it would make sense to separate
this stuff and perhaps host it at Excalibur.
Carsten
--
Carsten Ziegeler
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]