Java Reference
In-Depth Information
http://www.manning.com/crichardson, for the definition of the Hibernate-
AccountRepository , HibernateBankingTransactionRepository , and Hibernate-
ObjectDetacher , along with the configuration of the Hibernate SessionFactory
and the JDBC DataSource .
Dependency injection is an extremely easy way to configure an application.
Instead of using an object containing code to look up its dependencies, they are
automatically passed in by the bean factory. It doesn't have to call any application
server API s. In chapter 7, I'll show how dependency injection is a useful way of decou-
pling components from one another and the application server environment.
1.2.7
Deploying a POJO application
As I mentioned earlier, one of the great things about POJO s and lightweight
frameworks is that you can do a lot of development without going near an applica-
tion server. Eventually, however, you do need to deploy the application. An appli-
cation that uses Spring for transaction management and Hibernate or JDO for
persistence can often be deployed in a simple web container-only server such as
Jetty, Tomcat, or WebLogic Express, as shown in figure 1.7.
The application is simply packaged as a web archive file ( WAR ) and deployed in
the server's web container. It would use either a JDBC connection pool provided by
Application Server
Web Container
Presentation Tier
HTTP
Servlets
JSP
Browser
Business Tier
POJOs
Spring
Hibernate/JDO
JDBC
Figure 1.7
Deploying a POJO application
in a web container
JDBC Connection
Pool
 
 
 
 
 
 
 
Search WWH ::




Custom Search