cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Re: Cocoon and Spring
Date Thu, 01 Jun 2006 09:23:51 GMT
What Hibernate fiasco?? I thought Cocoon & Hibernate worked pretty 
well together?

>>> 2006/06/01 11:10 AM >>>

Great thanks heaps for that Jason. Thats pretty much what I thought was the case with the
MVCs. I am an XML processing fanatic, so I am heading Cocoon all the way:-) It is interesting
to see that Cocoon and Spring are getting closer links. Lets hope it doesnt turn out like
the whole hibernate fiasco! 


On 6/1/06, Jason Johnston <> wrote:Mike Casey wrote:
> Can anyone tell me the experiences they have had with running cocoon
> with spring? In particular, how did you get Spring to run Cocoon and how
> was this deployed under tomcat? Does the spring MVC framework get in the 
> way of things? Or could they possibly complement each other?

The simplest integration is probably to initialize the Spring
application context in web.xml with a ContextLoaderListener:


Then you can get access to the application context from anywhere you
have a cocoon Context object, e.g. from flowscript:

var appCtxt = cocoon.context.getAttribute(
var myService = appCtxt.getBean("myServiceBean"); 

There are also other techniques for getting access to Spring managed
services; do a search for "spring" at for
some examples. 

The next major version of Cocoon (2.2 or 3.0, not sure what it will end
up being labeled) has actually been changed so that it uses Spring
internally for its component management, so the integration should be 
that much cleaner.

In terms of Spring MVC, I don't know how it and Cocoon would play
alongside each other, since Cocoon is itself an MVC framework.
Personally I've never seen a need to use Spring MVC when I've got such a 
good one in Cocoon. :)  I'd be interested to hear if anyone else has had
experience combining them though.

This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice 
CSIR Copyright, Terms and Conditions 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.

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

View raw message