You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mike Casey <we...@gmail.com> on 2006/06/01 02:06:19 UTC
Cocoon and Spring
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?
Cheers
MC
Re: Cocoon and Spring
Posted by Patrick Refondini <pa...@pobox.com>.
Mike Casey wrote:
> No, its more the infighting between the two camps I was refering to. Spring
> works just fine with hibernate
>
> http://houseofhaug.net/blog/archives/2005/08/12/hibernate-hates-spring/
>
> MC
Thanks for the information. Pleased to see it's only religious, not
technical ;) I like both of these products and will certainly not change
my mind for the above.
Patrick
>
> On 6/2/06, Patrick Refondini <pa...@pobox.com> wrote:
>
>>
>> Mike Casey wrote:
>> > 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!
>> Spring Hibernate integration fiasco ? I thought it was mature ?
>>
>> Just wondering (and interested) by what you mean. I have used Hibernate
>> behind a custom facade from both Struts and Cocoon, with much
>> satisfaction. I thought Cocoon-Spring integration might benefit of even
>> easier Hibernate services access to Cocoon (or other ORM/Persistence
>> layers), am I wrong ?
>>
>> Patrick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and Spring
Posted by Mike Casey <we...@gmail.com>.
No, its more the infighting between the two camps I was refering to. Spring
works just fine with hibernate
http://houseofhaug.net/blog/archives/2005/08/12/hibernate-hates-spring/
MC
On 6/2/06, Patrick Refondini <pa...@pobox.com> wrote:
>
> Mike Casey wrote:
> > 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!
> Spring Hibernate integration fiasco ? I thought it was mature ?
>
> Just wondering (and interested) by what you mean. I have used Hibernate
> behind a custom facade from both Struts and Cocoon, with much
> satisfaction. I thought Cocoon-Spring integration might benefit of even
> easier Hibernate services access to Cocoon (or other ORM/Persistence
> layers), am I wrong ?
>
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
Re: Cocoon and Spring
Posted by Patrick Refondini <pa...@pobox.com>.
Mike Casey wrote:
> 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!
Spring Hibernate integration fiasco ? I thought it was mature ?
Just wondering (and interested) by what you mean. I have used Hibernate
behind a custom facade from both Struts and Cocoon, with much
satisfaction. I thought Cocoon-Spring integration might benefit of even
easier Hibernate services access to Cocoon (or other ORM/Persistence
layers), am I wrong ?
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and Spring
Posted by Mike Casey <we...@gmail.com>.
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 <co...@lojjic.net> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
Re: Cocoon and Spring
Posted by Jason Johnston <co...@lojjic.net>.
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org