Date: 2004-09-15T23:34:34
   Editor: JeanFrancoisPoilpret <[EMAIL PROTECTED]>
   Wiki: Jakarta HiveMind Wiki
   Page: HibernateSupport
   URL: http://wiki.apache.org/jakarta-hivemind/HibernateSupport

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -69,3 +69,14 @@
 
 = Discussion =
 
+I would like to add some additional request here.
+
+A recurrent problem (at least for me but I suppose I am not the only one) when 
using Hibernate API is that almost EVERY method can throw HibernateException 
which is checked. Personnally I prefer to use checked exceptions only for 
business, and unchecked (runtime) exception for "technical" problems. Hence 
using Hibernate obliges me (and others) to put an infamous try{}catch(){throw 
new RT;} in all my DAO methods!
+
+As far as I know in Spring framework, some "template" class (as it is called 
in Spring) has been created to change HibernateException in most calls into a 
Runtime exception.
+
+I think it would be good to offer the same kind of service in Hivemind.
+
+Unfortunately, I could not find any "powerful" way to implement that (in a 
generic way by proxies, for instance). The fact is that MANY Hibernate 
interfaces (SessionFactory, Session, Query, Criteria...) have methods throwing 
HibernateException.
+
+This makes me better understand the way it has been implemented in Spring: one 
Template class that combines all Session API + other common API from other 
classes, but it seems to me that it reduces the possibilities of Hibernate for 
the developer.

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

Reply via email to