Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.context
Interface CurrentSessionContext  view CurrentSessionContext download CurrentSessionContext.java

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
JTASessionContext, ManagedSessionContext, ThreadLocalSessionContext

public interface CurrentSessionContext
extends java.io.Serializable

Defines the contract for implementations which know how to scope the notion of a current session 55 .

Implementations should adhere to the following:

Implementors should be aware that they are also fully responsible for cleanup of any generated current-sessions.

Note that there will be exactly one instance of the configured CurrentSessionContext implementation per org.hibernate.SessionFactory.


Method Summary
 org.hibernate.classic.Session currentSession()
          Retrieve the current session according to the scoping defined by this implementation.
 

Method Detail

currentSession

public org.hibernate.classic.Session currentSession()
                                             throws org.hibernate.HibernateException
Retrieve the current session according to the scoping defined by this implementation.