beautypg.com

5 getting started with spring – HP Integrity NonStop H-Series User Manual

Page 5

background image

Defining the

PlatformTransactionManager

...........................................................83

Defining the Transaction Rollback (Optional).................................................................83

Programmatic Transaction Management..............................................................................84

Using the

TransactionTemplate

...............................................................................84

Using a

PlatformTransactionManager

...................................................................84

Recommendation..................................................................................................................85

Connection Pooling....................................................................................................................85

Connection Pooling using Apache C3P0..............................................................................85
Recommendations.................................................................................................................86

Tuning Connection Pool..................................................................................................86

Module File Caching Configurations..............................................................................................87

Configuring NonStop SQL/MX DataSource for MFC...............................................................87
Modifying the Spring Application.............................................................................................88

5 Getting Started with Spring

....................................................................................89

Prerequisites....................................................................................................................................89

NonStop System.........................................................................................................................89
Windows System........................................................................................................................89

Overview of EmpInfo......................................................................................................................89

Developing EmpInfo on Windows using the Eclipse IDE.........................................................90

Developing a Basic EmpInfo Application.............................................................................91

Creating a Dynamic Web Project.....................................................................................91
Creating the

index.jsp

File..........................................................................................95

Modifying the

index.jsp

File.......................................................................................98

Modifying the

web.xml

File...........................................................................................99

Creating the

EmpInfo-servlet.xml

File..................................................................101

Adding Dependency JAR Files in the Project Library Path..........................................104
Creating the Controller for EmpInfo.............................................................................106
Creating the View..........................................................................................................109

Developing and Configuring Views and the Controller....................................................110

Configuring the JSP Standard Tag Library....................................................................110
Adding JSTL and JSP Related Dependency JARs.........................................................113
Enhancing the Controller...............................................................................................113
Decoupling View from the Controller...........................................................................116

Developing Business Logic and Providing the Web Interface............................................117

Creating a Simple POJO................................................................................................118
Creating Data Access Object Implementation for JDBC...............................................118
Creating and Modifying Supporting Views to Display Business Data.........................119
Adding Dependency JAR Files......................................................................................120

Integrating the Web-tier of EmpInfo with NonStop SQL/MX Database............................121

Creating the

applicationContext.xml

File...........................................................121

Creating the

jdbc.properties

File...........................................................................122

Modifying the

EmpInfo-servlet.xml

File...............................................................124

Improving the Controller...............................................................................................125
Modifying the

web.xml

File........................................................................................127

Adding Dependency JAR Files......................................................................................127
Creating Database Catalog, Schema, and Tables on NonStop......................................128

Enabling EmpInfo to Delete and Retrieve Employee Details.............................................131

Creating JSPs to Delete and Retrieve Employee Details...............................................131
Creating the RowMapper Class.....................................................................................133
Modifying the

EmployeeDao.java Class

File......................................................134

Modifying the

Employee.java

File...........................................................................134

Modifying the

EmployeeController.java

File......................................................135

Modifying the

EmpInfo-servlet.xml

File.............................................................136

Table of Contents

5

This manual is related to the following products: