Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top
Image Removed
Image Added
Article donated by: Dondi Imperial, Leonard Flournoy, Hernan Cunico

...

Sample application
Anchor
sampleApp
sampleApp

The Loan BMP application is very simple. When the command line client is run, an entry is made into the database. The findByPrimaryKey() method of the CustomerHomeRemote interface is called and the field values of the returned CustomerRemote object are printed to the console. This is followed by a call to the findBySssNo() method after which the field values of the returned CustomerRemote object are printed to the console.

The following figure illustrates the application flow:

Image RemovedImage Added

The user runs the command line client which then either creates an entity bean (which then adds itself to the datasource) or asks for one, by primary key, which is created from information that is stored in the database.

...

In order to build the loan application a Maven script has been provided. Download the Loan application from the following URL:link:

Loan BMP Samplehttp://opensource2.atlassian.com/confluence/oss/download/attachments/1148/loan-bmp.zip

After extracting the zip file, a loan-bmp directory will be created. From now on, this directory will be referred as <bmp_home>. In that directory open the project.properties file. Edit the maven.jboss.home property to match your environment.

...

You should see the following screen:

Image RemovedImage Added

Click on Add Customer. Enter the new customer information then click Create, this will take you to the first page showing the updated list of customers.

...

CREATE TABLE CUSTOMER(ID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(45),BIRTHDATE DATE,SSS_NO VARCHAR(25),ADDRESS VARCHAR(60),ANNUAL_SALARY DOUBLE,LOAN_AMOUNT DOUBLE)

Image RemovedImage Added

Back to Top

Step-by-step migration
Anchor
migration
migration

...