Description: ServletFilter+ ThreadLocal+ DAO, 10 minutes and then experience the Hibernate forum on how to manage the session has been discussed for many, but because no one can run the complete example, many people on this point it was confusing. Today have the time, they did own a small example of paste out, hoping to save the learning time later.
File list (Check if you may need any files):