cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: Help with Cocoon and Spring
Date Sat, 08 Mar 2008 13:54:25 GMT
Patrick Heiden pisze:
> Hello!
> 
> I am planning to use Cocoon 2.2 fur a huge web-application and use spring as service-layer
together with hibernate for persistance. Both spring and hibernate are within my toolbox for
a while, but after reading all tutorials from cocoon.apache.org (and the presentations, too)
I am still not able to understand HOW spring is EXACTLY integrated within cocoon and how the
combination of the three frameworks should look like for a production-suitable application
(missing a sound getting-started-guide). After using mvn archetype:create ... for setting
up an standard project-structure for web-apps I could not exactly imagine what configuration
nedds to be put in certain place.
> More details:
> - imagine an application that consists of several pet-store-like facades
> - each facade is responsible for processing several well defined requests (the data within
them)

It maps to several separate blocks each containing SitemapServlet mounted at certain path.
Each
block can be created using archetype and you will already find default configuration of SitemapServlet.

> - to hook up this with SpringMVC I just define a DispatcherServlet and route through
different views

We have DispatcherServlet too but you don't need to bother about it, just create servlet beans
declarations in a file placed at /META-INF/cocoon/spring/*.xml of your block, see[1]. Routing
to
servlet beans is done basing on mount-path attribute.

> - HOW should I port this to cocoon-context to use FlowControl/continuations as my controller?

Once you define high-level routings to your separate SitemapServlet you just need to create
matchers
in your sitemap file tied to concrete SitemapServlet and call FlowControl functions.

> - do I 'have to' use several blocks for my application? What I mean here is: a persistence-block,
view-rendering-block, etc.. how does an elegant block-usage look like?

It's advised to have several blocks if your application can be split into separate structure
units.

> - how should the integration of hibernate should look like to enable the pooled connections
to be used within flows (found hints for OpenSessionInView filters)

It's more question for Spring usage than Cocoon usage. You need to check documentation of
Spring to
see how to configure connection pooling.

> I recognized several opinions about cocoon-2.2 documentation and support. And my opinion
is, that a better starting guide could help with above questions. BUT: I am not here to bother
anybody! I think you build a nice framework (have some experience with 2.1) and I am not afraid
of steep learning curves. I think above questions are within context of first implementation-design
and I miss the basic theory behind your ideas and/or usage-scenarios.

I hope I'll be able to help you more once you came with more concrete problems. Feel free
to ask
more questions.

> Looking forward to answeres with best regards,
> Patrick

[1] http://cocoon.apache.org/2.2/core-modules/core/2.2/1263_1_1.html

-- 
Best regards,
Grzegorz Kossakowski (who eventually went back online)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message