Versions Compared

Key

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

Anchor
top
top
Image Removed
Image Added
Article donated by: Henry Isidro, Leonard Flournoy, Hernan Cunico

...

Sample application
Anchor
sampleApp
sampleApp

This sample application Session Bean Sample Application shows how session beans are used and deployed in a container. There are two clients, one for stateless session beans and another for stateful session beans. Both client applications use the same database which contains a table that stores loan application details. An entity bean is used to connect to and operate on the loan details table. A session bean is then used by the client application to get specific details from the database using the entity bean. The first client creates a stateless session bean and displays a list of denied loan applications via a method defined in that EJB. The second client creates a stateful session bean and adds loan applications to the database.

The following figure illustrates the application flow:

Image RemovedImage Added

Application Beans

...

Download the Session Bean sample application from the following URL:link:

Session Bean Samplehttp://opensource2.atlassian.com/confluence/oss/download/attachments/1155/session.zip

After extracting the zip file, a session directory will be created. From now on, this directory will be referred as <session_home>.

...

The following figures illustrate the home page for the Web Application as well as the testing for the stateless and stateful beans depending on your selection on the Web Application home page.

Image RemovedImage Added

Image RemovedImage Added

Image RemovedImage Added

Back to Top

The Geronimo environment
Anchor
Geronimo
Geronimo

...

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

...

As with JBoss, the following figures illustrate the home page for the Web Application as well as the testing for the stateless and stateful beans depending on your selection on the Web Application home page.

Image RemovedImage Added

Image RemovedImage Added

Image RemovedImage Added

Back to Top

Summary
Anchor
summary
summary

...