Read data dynamically and transparently
Introduction: This tutorial expands the Apache Geronimo application created in part 2nd of this series of tutorials (6 sections). The Geronimo application Server, Spring framework, and control inversion (inversion of CONTROL,IOC) are presented to you in part 1th. It then details how to develop, configure, and deploy the first application based on the Spring framework. In this section, you will learn how to get integrated technologies-such as the Spring Java database connection (Java DB connectivity,jdbc) and spring data Access objects (data access Object,dao) api-- Play a role in dynamically reading application data from the Apache Derby database. You'll also learn how to use IBATIS to integrate object-relational mappings (objects relational mapping,orm) into your application, and enjoy the beauty of dependency injection by modifying the data source in your application without touching any code.
Before you start
This series of tutorials is for Java™platform, Enterprise Edition (Java EE) developers who need to know more about the spring framework and how to use the powerful features of the spring Framework on the Apache Geronimo application Server Rapporteur
About this series of tutorials
This series of tutorials is divided into 6 sections that show you how the spring framework and the spring framework are used in conjunction with Geronimo. We will start by examining the various Spring framework methods and how they are used in conjunction with the Geronimo server. Throughout the series, you will develop and deploy personal telephony applications. The application includes the following features:
Show Phone Book
Show details of each entry
Add a new entry to the phone book
Edit, modify, and delete entries
Add more details to the entry, such as the primary e-mail address
Part 1th describes the various modules of the Spring framework and describes the relationship between each module and the development of Java EE applications on the Geronimo application server. This section also explains the approach that the Spring framework is based on.
Part 2nd describes how to use the Spring framework to build the first skeleton system application on Geronimo.
In part 3rd, you will use the Derby database to add JDBC support to extend the Geronimo application obtained in part 2nd. You'll also learn how to integrate ORM into an application that uses IBatis.
In part 4th, you will face spring aspect-oriented programming (AOP) and the Spring WEB framework. With spring AOP, any object managed by the spring framework can become aspect-oriented, and this tutorial takes advantage of declarative transaction management services provided through Spring AOP.
The 5th part describes Spring Model-view-controller (MVC). This tutorial introduces you to the Spring MVC Framework and Web view, giving you an idea of how spring MVC will get started.
Part 6th of the end of this tutorial describes how to use the JavaServer page™ (jsp™), Velocity, Tile, and PDF export functions through the Spring framework. You will use and experience the various Web views built into Spring MVC.
About this tutorial
In part 2nd, you start using some of the modules in the Spring framework to deploy the Telephony application. You also learned how to deploy this telephony application on Geronimo. The data in the application is statically hard-coded into the JSP page. In this tutorial, you will learn how to dynamically read data from the Derby database and how to use the Geronimo Web console to create tables and access data from using the spring JDBC and Spring DAO APIs.
In addition, you will learn how to use the IBATIS ORM framework to map data objects to relational database objects and use ORM SQL mappings with the help of the Apache Commons connection API to enable applications to read data transparently.
Finally, all technologies will be integrated into the application, which will use the spring DAO and the SQL mappings defined with IBATIS ORM and connect to the database using spring JDBC. Once you've built your application, you'll see the beauty of dependency injection; You can change a few lines in a configuration file to alter the data source used by your application without touching any code.
This tutorial shows you how to combine these technologies to provide you with another way to design your application model implementations.