| org.apache.tapestry.hibernate.HibernateSessionManager
All known Subclasses: org.apache.tapestry.internal.hibernate.HibernateSessionManagerImpl,
HibernateSessionManager | public interface HibernateSessionManager (Code) | | Manages the Hibernate session for the current thread. This includes creating the session as
needed, allowing the session to checkpoint (commit the current transaction and continue) and
commit the transaction automatically at the end of the request.
Remember that in Tapestry, action requests and render requests are entirely seperate, and you
will see a seperate request and a seperate transaction for each. Care should be taken to ensure
that entity objects that are retained (in the session, as persistent field values) between
requests are handled correct (they tend to become detached instances).
This implementation of this service is per-thread.
|
Method Summary | |
void | abort() Aborts the current transaction, and starts a new tranasction to replace it. | void | commit() Commits the current transaction (which will cause a flush of data to the database), then starts
a new transaction to replace it. | Session | getSession() Gets the active session for this request, creating it as necessary. |
abort | void abort()(Code) | | Aborts the current transaction, and starts a new tranasction to replace it.
|
commit | void commit()(Code) | | Commits the current transaction (which will cause a flush of data to the database), then starts
a new transaction to replace it.
|
getSession | Session getSession()(Code) | | Gets the active session for this request, creating it as necessary. When the session is first
created, a transaction is started.
the request's session See Also: HibernateSessionSource |
|
|