-->
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: Hibernate Tools DAO/Home intent?
PostPosted: Mon Apr 13, 2009 9:34 am 
Beginner
Beginner

Joined: Wed Aug 11, 2004 3:50 pm
Posts: 26
I recently returned to Hibernate after my job took me away from it for a few years. I noticed that Hibernate Tools now produces DAOs (Home classes).

Being used to creating my own DAOs, this is nice. But looking at the generated classes, I see that they largely encapsulate the normal Hibernate atomic calls in a try/catch block, do some logging, and rethrow the exceptions. In your code you still have to catch the exceptions, manage transactions, and add other code that I'm used to have in my DAOs. In other words a lot of work still needs to be done when using them.

This strongly 'smells' as there being an intended pattern for modifying and/or using the generated DAOs.

I presume this pattern is documented somewhere... could somebody point me to the documentation that describes the pattern for using these generated DAOs, and if possibly also explain the 'why' of the pattern?

And if that documentation does not exist, perhaps provide an explanation or point to an example of 'proper use'?

Thanks,

b.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 15, 2009 7:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
The DAO's have been non-maintained for a long time :(

The intent were to do minimal standard/hibernate-defacto compliant dao's without 3rd party dependencies. i.e. use JTA, use standard SessionFactory API etc.

Also wanted to do the generic DAO pattern but it never happend.

If anyone want to maintain/contribute this then this is an area that could need some tender care.

_________________
Max
Don't forget to rate


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.