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
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 :
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,
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
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
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
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
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
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