cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Help with Cocoon and Spring
Date Mon, 10 Mar 2008 23:05:13 GMT
Patrick Heiden pisze:
> To get this clear: Step 1 to N is creating Blocks 1 to N (some of them are shared). Then
I just create 'my-webapp' with maven archetype. Block-wiring is done through servlet-service-configuration-files
(pom.xml, servlet-service.xml). Usage of the wired blocks is defined through sitemaps and
I am able to define global beans within webApplicationContext.xml and 'block'-specific (local)
beans within META-INF/cocoon/spring/*-context.xml.
> And thats it?
> Wow!

Almost. ;-)
As I said earlier current implementation of Spring integration is little bit simplistic because
there is only one global Spring container and no block-specific ones. So even if you declare
bean in
a block's configuration file it will be visible everywhere. However, you should be warned
that it's
not our aim and this will be changed in the future so you should not rely on such implementation
detail and always declare dependencies correctly.

Moreover, almost always you should not touch contents of my-webapp module (especially: not
add any
bean declarations there) because it should be considered as a glue and infrastructure module.
contains all necessary configuration for Maven to make a deployable WAR package and usually
its the
only function, in a fact.

Grzegorz Kossakowski

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message