hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hensley, Richard" <>
Subject Hibernate (HIVEMIND-54)
Date Wed, 08 Dec 2004 02:06:12 GMT
There is a note from James Carman that the contains
some interesting stuff, and that there is an article being written for TSS.

James, did the article get completed. I was searching around on TSS, but
could not find it.

If not, I have a few questions about your example code.

Session Management Comments:

>From what I was able to piece together, the hibernate session is managed
using the OpenSessionInView pattern that is present throughout the Hibernate
in Action book. The one in the book uses thread local storage, but it's the
same idea. Is this basically right?

Added to this is that the session is automatically closed when a thread is
through using the thread. I make this comment based on the threaded model of
the HibernateSessionWrapper service.

The one thing I did notice about the HibernateSessionWrapper is that it does
not discard the session object when an exception occurs. It is a documented
hibernate practice to discard the session because it is invalid when an
exception occurs.

Transaction Management Comments:

>From what I could gather there are two choices.

1. Use the Transaction servlet filter that starts a transaction at the start
of each request, and ends it after the request has been completed.

2. Use the Transaction Interceptor on targeted services. This allows certain
methods to create transactional boundaries based on their entry and exit.

I'm not a Struts expert, so I'm not sure if these two methods were intended
to be used together or not. Could you shed some light?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message