List of Figures

 

Chapter 1. Introducing Spring: the dependency injection container

Figure 1.1. A high-level block diagram illustrating Spring’s six basic functional areas

Figure 1.2. The Core Container

Figure 1.3. JdbcAccountDao specifies a dependency on Apache DBCP’s BasicDataSource, which is a concrete DataSource implementation.

Figure 1.4. Now JdbcAccountDao has the desired interface dependency on DataSource, but AccountService has dependencies on two concrete classes.

Figure 1.5. Now the dependencies are interface-based and the concrete classes are configured transparently through Spring.

Figure 1.6. AccountService has an interface-based association with AccountDao, and both depend on Account.

Figure 1.7. Using external properties files to manage configuration for separate environments

Figure 1.8. Singleton-scoped beans are shared among dependent class instances.

Figure 1.9. Prototype-scoped beans are instantiated every time one of their dependent classes is retrieved from the container. But if the dependent class is singleton-scoped, subsequent retrievals of it will return already-cached instances where the prototype-scoped dependency is effectively cached as well (it isn’t reinstantiated).

Chapter 2. Data persistence, ORM, and transactions

Figure 2.1. The layers involved when implementing a typical Java-based persistence architecture

Figure 2.2. An app-managed DataSource

Figure 2.3. Getting a container-managed DataSource via JNDI lookup