
318 Migrating Applications from WebLogic, JBoss and Tomcat to WebSphere V6
Improves testability
JUnit test cases usually do not depend on external systems like databases or
a J2EE container. By coding to interfaces, you automatically improve
testability. Changing the concrete implementation of an interface, for example
changing a DAO to use an in-memory database instead of an RDBMS, is
done in one place only, the container configuration.
There are several implementations of the Dependency Injection pattern that are
available for download, such as:
PicoContainer
PicoContainer is a light-weight container that implements the Dependency
Injection ...