and to elaborate on the part about starting sessions in xwork interceptors or servlet filters, if I were to start a session in an interceptor or filter and stuff it into a ThreadLocal then access in my app, then somewhere in the app I get thrown a HibernateException it could put the session into an bad internal state thats not recoverable then you'd have to close the session and restart a new one.
see: http://hibernate.bluemars.net/43.html
if you find a better way to do this please let me know :)
James Cook wrote:
currently in my daos i create a session object for every dao operation like dao.save dao.load, etc
I think this is exactly what caused the freeroller application (using Hibernate also) to suffer some extreme scalability failures.
As far as best practices go, Jason has started Conductor that is supposed to provide a framework (built on top of WebWork) that integrates Hibernate and some user-management features. Basically a starting point for app developers. There isn't much there yet however.
http://conductor.dev.java.net
I found the xPetstore an excellent source of good application design. It uses WebWork (1.3) and Hibernate.
http://xpetstore.sourceforge.net/
Can you elaborate a little more regarding this statement?
but thats going to cause some problems anyways if the session were to be put in a un-usable state
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork