Starting with v3.1 (notice I work with 3.2.5ga though) Hibernate has introduced the interesting (and really helpful) concept of Session context management where Hibernate itself provides a built-in mechanism to manage the session.
In previous releases the session (and the transaction) had to be maintained by the developer, typically using the Thread Local pattern where the session is stored in a Java ThreadLocal class (more details here). Fortunately a much simpler way is provided by Hibernate v3.1.
Posted by Beppe Catanese