-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Best practice to implement a DAO using Webwork
PostPosted: Mon Aug 16, 2004 7:57 am 
Newbie

Joined: Wed Aug 11, 2004 11:12 am
Posts: 10
Location: Brazil
Hi There,

I'm starting a new project using Webwork as MVC framework and I want to use Hibernate as persistence framework.
My question is about the best practice to implement the DAO. My first idea is create a DAO class that have the SessionFactory static and anothers classes to implements the methods such as Save, Update, Delete and Load. Now, I don't know if is good to implements this methods in the Action class from Webwork or use a different class to do it. For instance, I have a CustomerAction (Action which will called by webwork), I must implements the hibernate methods within this class or create another class for instance CustomerDAO?

Thanks for idea.

Junior



Hibernate version: 2.1.4

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 16, 2004 9:06 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Depends the size of your application.
usually, people like to isolate different layers

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.