Derek,

I'm not using Hibernate, but we are using Spring.  What would you like to
know?  I have no problem releasing knowledge. Unfortunately, posting source
code is another matter. I have to get approval to send source files that we
are actually using.

Basically, we wrote a "lifecycle" component which has a Container interface
and a ContainerFactory. We've implemented two Container variations, one for
Pico and one for Spring, although we are only using Spring.  I then wrote an
Avalon lifecycle component. The configure method, as in all Avalon
components in Cocoon, gets its configuration from cocoon.xconf. It is
configured with the name of the file that Spring uses for configuration. My
configure method gets a Container from the factory, gets an input stream
from using the config file and calls the Container's configure method
passing the input stream.

That's really all there is to it. After that anything that needs to access
Spring components uses ContainerFactory.getContainer() to locate the
configured container.

The only "trick" here is that in order to get my Avalon component built
something has to do a ServiceManager lookup on the lifecycle component. I
have other Avalon components and have put the lookup() in the first
component that needs it.

I didn't actually write our lifecycle container, but the developer who did
told me that Spring comes with a sample showing how to integrate it into any
servlet by providing a routine that gets specified in web.xml.  He actually
did that first, but I preferred the method described above.

Again, I don't use Hibernate so I'm not sure how it fits into this unless it
is just a component that can be managed by Spring.

Ralph

-----Original Message-----
From: Derek Hohls [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 10, 2004 11:15 PM
To: [EMAIL PROTECTED]
Subject: RE: MVC Framework - options?

Ralph

I am not sure that anyone is planning to try and integrate
Struts *and* Cocoon - I think the idea is to replace Struts
with Cocoon in the Spring-Hibernate setup.

Again, I'll be begging - if you have the experience with this,
won't you consider "releasing" some of that knowledge (i.e.
more than just the odd, tantalizing tidbit) to those of us still 
wanting to take this type of approach?

Thanks
Derek



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

Reply via email to