I've been playing with it today, and the best solution seems to be to not use 
HibernateUtil. The reason it was created was to solve many of the problems that 
are taken care of by org.jboss.hibernate.session.HibernateContext. Usage of 
HibernateContext results in less code. The same amount in the code using 
Hibernate, minus the whole HibernateUtil class. 

Highly recommended reading has been provided by JBoss already: 
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHibernate2

The upshot of this is to just be sure to call session.flush(); before closing 
the session.

When using HibernateContext is closing the session even necessary?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878596#3878596

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878596


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to