Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Application Server 7, Enterprise Edition Migrating and Redeploying Server Applications Guide

Appendix A
iBank Application Specification

The iBank application is used as the migration sample. This application simulates a basic online banking service with the following functionality:

The application is designed after the MVC (Model-View-Controller) model where:

Standard J2EE methods are used for assembling and deploying the application components. This includes the definition of deployment descriptors and assembling the application components within the archive files:

The use of standard J2EE assembling methods will be useful in pointing out any differences between Sun ONE Application Server 6.0/6.5 and Sun ONE Application Server 7 EE, and any issues arising thereof.

Tools used for the development of the application

Sun ONE Studio Enterprise Edition for Java, Release 4.0
Oracle 8i 8.1.6

Database schema

The iBank database schema is derived from the following business rules:

These business rules are illustrated in the entity-relationship diagram below:

Figure A-1  Database Schema

Figure shows the Database Schema for the iBank application..

The database model translates as a series of table definitions below, where primary key columns are printed in bold type, while foreign key columns are shown in italics.

BRANCH

BRANCH_CODE

CHAR(4)

NOT NULL

4-digit code identifying the branch

BRANCH_NAME

VARCHAR(40)

NOT NULL

Name of the branch

BRANCH_ADDRESS1

VARCHAR(60)

NOT NULL

Branch postal address, street address, 1st line

BRANCH_ADDRESS2

VARCHAR(60)

 

Branch postal address, street address, 2nd line

BRANCH_CITY

VARCHAR(30)

NOT NULL

Branch postal address, City

BRANCH_ZIP

VARCHAR(10)

NOT NULL

Branch postal address, Zip code

BRANCH_STATE

CHAR(2)

NOT NULL

Branch postal address, State abbreviation

CUSTOMER

CUST_NO

INT

NOT NULL

iBank customer number (global)

BRANCH_CODE

CHAR(4)

NOT NULL

References this customer's branch

CUST_USERNAME

VARCHAR(16)

NOT NULL

Customer's login username

CUST_PASSWORD

VARCHAR(10)

NOT NULL

Customer's login password

CUST_EMAIL

VARCHAR(40)

 

Customer's e-mail address

CUST_TITLE

VARCHAR(3)

NOT NULL

Customer's courtesy title

CUST_GIVENNAMES

VARCHAR(40)

NOT NULL

Customer's given names

CUST_SURNAME

VARCHAR(40)

NOT NULL

Customer's family name

CUST_ADDRESS1

VARCHAR(60)

NOT NULL

Customer postal address, street address, 1st line

CUST_ADDRESS2

VARCHAR(60)

 

Customer postal address, street address, 2nd line

CUST_CITY

VARCHAR(30)

NOT NULL

Customer postal address, City

CUST_ZIP

VARCHAR(10)

NOT NULL

Customer postal address, Zip code

CUST_STATE

CHAR(2)

NOT NULL

Customer postal address, State abbreviation

ACCOUNT_TYPE

ACCTYPE_ID

CHAR(3)

NOT NULL

3-letter account type code

ACCTYPE_DESC

VARCHAR(30)

NOT NULL

Account type description

ACCTYPE_INTERESTRATE

DECIMAL(4,2)

DEFAULT 0.0

Annual interest rate

ACCOUNT

BRANCH_CODE

CHAR(4)

NOT NULL

branch code (primary-key part 1)

ACC_NO

CHAR(8)

NOT NULL

account no. (primary-key part 2)

CUST_NO

INT

NOT NULL

Customer to whom accounts belongs

ACCTYPE_ID

CHAR(3)

NOT NULL

Account type, references ACCOUNT_TYPE

ACC_BALANCE

DECIMAL(10,2)

DEFAULT 0.0

Cleared balance available

TRANSACTION_TYPE

TRANSTYPE_ID

CHAR(4)

NOT NULL

A 4-letter transaction type code

TRANSTYPE_DESC

VARCHAR(40)

NOT NULL

Human-readable description of code

TRANSACTION_HISTORY

TRANS_ID

LONGINT

NOT NULL

Global transaction serial no

BRANCH_CODE

CHAR(4)

NOT NULL

key referencing ACCOUNT part 1

ACC_NO

CHAR(8)

NOT NULL

key referencing ACCOUNT part 2

TRANSTYPE_ID

CHAR(4)

NOT NULL

References TRANSACTION_TYPE

TRANS_POSTDATE

TIMESTAMP

NOT NULL

Date & time transaction was posted

TRANS_DESC

VARCHAR(40)

 

Additional details for the transaction

TRANS_AMOUNT

DECIMAL(10,2)

NOT NULL

Money amount for this transaction

Application navigation and logic

High-level view of application navigation

Figure A-2  Application navigation and logic

Figure shows the high level view of the application Navigation in the iBank application.

Application Components

Each table in the database schema is encapsulated as an entity bean:

Entity Bean

Database Table

Account

ACCOUNT table

AccountType

ACCOUNT_TYPE table

Branch

BRANCH table

Customer

CUSTOMER table

Transaction

TRANSACTION_HISTORY table

TransactionType

TRANSACTION_TYPE table

All entity beans use container-managed persistence (CMP), except Customer, which uses bean-managed persistence (BMP).

Currently, the application only makes use of the Account, AccountType, Branch, and Customer beans.

The InterestCalculator bean is a stateless session bean that encapsulates financial calculations. It is responsible for providing the compound interest projection calculations, through the projectEarnings() method.

Fitness of design choices with regard to potential migration issues

While many of application design choices made are certainly debatable especially in the "real-world" context, care was taken to ensure that these choices enable the sample application to encompass as many potential issues as possible as one would face in the process of migrating a typical J2EE application.

This section will go through the potential issues that you might face when migrating a J2EE application, and the corresponding component of iBank that was included to check for this issue during the migration process.

With respect to the selected migration areas to address, this section specifically looks at the following technologies:

Servlets

The iBank application includes a number of servlets, that enable us to detect potential issues with:

Java Server Pages

With respect to the JSP specification, the following aspects have been addressed:

JDBC
Enterprise Java Beans
Application Assembly



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.