Versions Compared

Key

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

...

  • com.ibm.demo.session.stateless
    • LoanManagerBean -it has the deniedLoans() method that is used to get a list of all customers whose loan applications are denied based on the condition that their Annual Salary to Loan Amount ratio is less than 0.1
    • LoanManagerRemote - the remote interface for the EJB.
    • LoanManagerHomeRemote - EJBHome Interface.

Back to Top

Tools used

The tools used for developing and building all the applications are:

Eclipse with JBoss IDE

The Eclipse with JBoss IDE plug-ins was used for development of Java-source code of the sample applications. Eclipse is a very powerful and popular open source development tool. Eclipse can be downloaded from the following URL:

http://www.eclipse.org

Apache Maven

Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM). Maven can manage a project's build, reporting and documentation from a central piece of information.

For this migration example Maven 1.0.2 was used. Maven can be downloaded from the followinf URL:

http://maven.apache.org

Back to Top

Sample database

The sample database for the MDB sample application has only one table. This is an in-memory table. The MEMORY storage engine creates tables with contents that are stored in just in memory. These were formerly known as HEAP tables.

The following table describes the fields of the CUSTOMER table.

Field

data type

id

INTEGER

name

VARCHAR(45)

birthdate

DATE

sss_no

VARCHAR(25)

address

VARCHAR(60)

annual_salary

DOUBLE

loan_amount

DOUBLE

Back to Top

The JBoss environment
Anchor
JBoss
JBoss

This section shows you how and where the sample JBoss reference environment was installed so you can map this scenario to your own implementation. Note that for this migration example JBoss v4.0.2 was used.

Detailed instructions for installing, configuring, and managing JBoss are provided in the product documentation. Check the product Web site for the most updated documents.

The following list highlights the general tasks you will need to complete to install and configure the initial environment as the starting point for deploying the sample application.

  1. Download and install JBoss v4 as explained in the product documentation guides. From now on the installation directory will be referred as <jboss_home>
  2. Create a copy of the default JBoss v4 application server. Copy recursively <jboss_home>\server\default to <jboss_home>\server\<your_server_name>
  3. Start the new server by running the run.sh -c <your_server_name> command from the <jboss_home>\bin directory.
  4. Once the server is started, you can verify that it is running by opening a Web browser and pointing it to this URL: http://localhost:8080. You should see the JBoss Welcome window and be able to access the JBoss console.
  5. Once the application server is up and running, the next step is to install and configure all the remaining prerequisite software required by the sample application. This step is described in the following section.

Back to Top

Install and configure prerequisite software

In order to build and run the Loan BMP application included in this article, you need to install and configure the build tool and the database that is used by the application.

Modify database settings

This application is using the HSQL database that comes as part of the JBoss bundle. You need to modify the script for creating the database. Edit the localDB.script file located in the following directory:

<jboss_home>\server\<your_server_name>\data\hypersonic

Add at the top of the localDB.script file the content of the following example in order to create the sample HSQL database.

Note

Make sure JBoss is not running at the time of modifying this file.

CREATE MEMORY 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)

Configure Maven

As mentioned before, Apache Maven is used to build the binaries for the Loan BMP application. If you do not have Maven installed this is a good time for doing it.

Apache Maven can be downloaded from the following URL:

http://maven.apache.org

Back to Top

The Geronimo environment
Anchor
Geronimo
Geronimo

...