> While reading hibernate quick start with tomcat, I found that developer
> need to write their own HibernateUtil to manage sessions. Shouldn't it
> be automatically handled by framework?
If Hibernate automatically plugged into a framework (any framework), it
would reduce its utility for those developers not using that frameowrk, or
who have specialized needs not met by the particular way Hibernate
integrated with the framework.
Therefore, Hibernate as a project made a deliberate decision to punt on this
question; how you use the persistence services is up to you. The Hibernate
people do recognize that this is a common question, so a fairly common
solution is outlined in the documentation. But don't expect them to write
the code, because you may need something different.
-- Adam Maass