What Hibernate fiasco?? I thought Cocoon & Hibernate worked pretty 
well together?

>>> [EMAIL PROTECTED] 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! 

MC

On 6/1/06, Jason Johnston <[EMAIL PROTECTED]> 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:

<listener> 
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

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(
Packages.org.springframework.web.context.WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
);
var myService = appCtxt.getBean("myServiceBean"); 

There are also other techniques for getting access to Spring managed
services; do a search for "spring" at http://wiki.apache.org/cocoon 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
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
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
[EMAIL PROTECTED]


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]