This post originated from an RSS feed registered with Java Buzz
by Peter Karich.
Original Post: Testable HibernateUtil
Feed Title: Java and more ...
Feed URL: https://karussell.wordpress.com/category/java/feed/
Feed Description: Just another weblog. Its about my developer experiences with Java in general. In detail I will blog about NetBeans, Eclipse, Design Patterns, News, Web Frameworks and other tools. My focus will be open source tools, which make the life of a Java developer easier.
I have seen many projects using the HibernateUtil which was proposed in the docs.
This class is not really testable because for example you cannot configure that it should use the test database. Normally I would suggest you using Spring and avoiding the singleton pattern, but there is a also a simple work around: introduce a [...]