Educating the world

Our blog has over 10,000 readers a month

Tags: junit

Where do I put my beans?

December 9th, 2008
Where do I put my beans? What beans? Coffee beans? Java beans? No - Spring beans! When running a servlet container, such as Apache Tomcat, you must define all your java beans in such a way as to facilitate the separation of the live and development sy… more »

LazyInitializationException, Spring, Hibernate and JUnit Nightmere

October 15th, 2008
When using hibernate inside a container like Tomcat or JBoss the transaction manager is set up as part of the container’s configuration. The container handles the transaction synchronisation and tells the application when to start and stop the… more »

Spring JUnit test to assert test for exceptions

October 14th, 2008
When writing unit tests you often need to check to see if a method throws a particular type of exception under a particular set of conditions. In the package org.springframework.test there is a handy helper class to help you do this. Codenew… more »