Re: Cocoon / Hibernate revisited

2007-05-31 Thread Baptiste Placé
Hi Tricia, I would add to Johannes' answer those advantages of DAOs (http://java.sun.com/blueprints/patterns/DAO.html) : The Data Access Object (or DAO) pattern: * separates a data resource's client interface from its data access mechanisms * adapts a specific data resource's

Re: Cocoon / Hibernate revisited

2007-05-31 Thread Baptiste Placé
Johannes, I have successfully refactored my code with your last update of the wiki article. Really clean and elegant. I'm having one behavior I don't understand. After starting tomcat, when I browse the homepage of my webapp, where no request are made on the database, I get this :

Re: Re: Cocoon / Hibernate revisited

2007-05-31 Thread Johannes Textor
Hi Baptiste, how is your filter-mapping defined in web.xml ? This looks like you map the filter to all URLs, including images, css, non-database-dependent HTML and so on ... you should map the filter only to those URLs which actually use the hibernate session. This is a little difficult,

Re: Cocoon / Hibernate revisited

2007-05-31 Thread Baptiste Placé
Johannes, url-patterns of servlet mapping are indeed very constraining. No real wildcard neither regexp. Changing the url to add one '/' had some side effects which are quite annoying (problem with continuation url and resources finding). Right now I'm trying to make an EmptyFilter for css, js

Re: Cocoon / Hibernate revisited

2007-05-30 Thread Fabrizio Sitzia
Hello Johannes, following an inspiring discussion with Fabrizio here on the User's list, I reworked the Cocoon and Hibernate tutorial and the underlying glue classes. The solution is now free of major architectural sins (as far as I can say) and allows a clean implementation of DAOs. No more

Re: Cocoon / Hibernate revisited

2007-05-30 Thread Johannes Textor
Hi Tricia, What is the advantage of using a DAO? I'm not sure if I am the right person to answer this question, but I'll give it a try. Quoting from Wikipedia at http://en.wikipedia.org/wiki/Data_Access_Object: Data Access Objects are a Core J2EE

Re: Cocoon / Hibernate revisited

2007-05-30 Thread Johannes Textor
Hi Fabio, Fabrizio Sitzia wrote: I've looked your page up in the Wiki - Wow! (Einfach geil!) Thanks for the props :) As soon as I've got something I can trust in production, I'll write up the Wiki page describing it. I'll keep you posted. I'm looking forward to see that. Let's get rid of

Cocoon / Hibernate revisited

2007-05-28 Thread Johannes Textor
Hello, following an inspiring discussion with Fabrizio here on the User's list, I reworked the Cocoon and Hibernate tutorial and the underlying glue classes. The solution is now free of major architectural sins (as far as I can say) and allows a clean implementation of DAOs. No more opening

Re: Cocoon / Hibernate revisited

2007-05-28 Thread Tricia Williams
Hi Johannes, Thanks for your work on this! I'm currently in the process of setting up hibernate 3 with cocoon 2.1.10 and have been back and forth between the the tutorials (simple application) at http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#tutorial-firstapp and