---------------------------------------> FALTA TRADUCCION
Since Banking Web Application is a part of EAR, the BankManagerFacade Session Bean will be reffered as a local interface. Those additional configuration information required for the EJB reference can be found in the web.xml.

web.xml

Account Balance Modifier swing application refers the same BankManagerFacade Session bean as a remotely refer EJB. It's configuration information can be found in the bank_client.properties file.

bank_client.properties

Icon

Always check for the correct network information to run this application client out side of the local computer.

Sample Database

The sample database that is being used to demonstrate this application is inbuilt Derby database. The name of the sample database is BankDB and it consists of three tables, CUSTOMER ,ACCOUNT and EXCHANGE_RATE. The fields for each of these tables are described below.

Table Name

Fields

CUSTOMER

CUST_ID (PRIMARY KEY)
CUST_NAME

ACCOUNT

ACC_NO (PRIMARY KEY)
ACC_TYPE
BALANCE
CUSTID_FK

EXCHANGE_RATE

RATE_ID (PRIMARY KEY)
CURRENCY
RATE

The CUSTOMER table stores the data related to the customers.It stores only the identification number and and the name. ACCOUNT table has a unique account number for identification. Account type and balance are the other information stored. CUSTID_FK is a foriegn key to the Customer table which is the owner of the Account. EXCHANGE_RATE table has a primary key of RATE_ID for an identification. Each record of EXCHANGE_RATE has CURRENCY name and RATE paid by the bank.

Tools used

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

XDoclet

XDoclet is an open source code generation engine. It enables Attribute-Oriented Programming for java. In short, this means that you can add more significance to your code by adding meta data (attributes) to your java sources. This is done in special JavaDoc tags.
Although XDoclet originated as a tool for creating EJBs, it has evolved into a general-purpose code generation engine. XDoclet consists of a core and a constantly growing number of modules. It is fairly straight forward to write new modules if there is a need for a new kind of component.http://xdoclet.sourceforge.net/xdoclet/index.html

Apache Derby

Apache Derby, an Apache DB subproject, is a relational database implemented in Java. Its footprint is so small you can easily embed it in any Java-based solution. In addition to its embedded framework, Derby supports a more familiar client/server framework with the Derby Network Server.http://db.apache.org/derby/index.html

Eclipse

The Eclipse IDE was used for development of the sample application. This is a very powerful and popular open source development tool. It has integration plug-ins for the Geronimo too. Eclipse can be downloaded from the following URL:http://www.eclipse.org

Apache Ant

Ant is a pure Java build tool. It is used for building the war files for the Inventory application. Ant can be downloaded from the following URL:http://ant.apache.org

Paste the content BankDB.sql to the SQL Commands text area and press Run SQL button.

Modify Property Files

Bank application comes with an Ant script to help users to build from source code. It has to be properly configured before using it to build from source code. build.properties file in the config directory has to modify according to your enviroment. Set the correct paths to the xdoclet.home and geronimo.home directories.
Also set the correct network information in the bank_client.properties file, which is going to reffered by remote application client.

Icon

This build script depends on XDoclet version 1.2.3 and Geronimo 1.1.

Building

Use a command prompt to navigate into the bank directory and just give ant command to build. It will create the Bank.ear and bankclient.jar under the bank/releases folder. Also note it will create a lib folder with a list of jar files reffered by the client application. Now, you are ready to deploy bank application in the Geronimo Application server.

Deploying

Deploying sample application is pretty straight forward as we are going to use the Geronimo Console.

Testing of the Sample Application

Core business application logic of the banking application is shared between two different clients. Testing of each client is given below.

Banking Web Application

To test the sample web application open a browser and type http://localhost:8080/Bank. It will forward you to the index page of banking application which has direct links to the view customer and exchange rate information. To view the list of account information of each customer, provide a relavant customer id in the DB. Exchange rate page will display list of all currencies in the exchange rate table.

Banking Remote Application

Banking remote application client can be run by issuing the java -jar bankclient.jar in a command prompt. Use an existing account number in the database to view it's balance. Modification of account balance can be done by providing a numeric value to the balance field and using the Update button.

Icon

Always consider that the lib folder inside releases are a part of this client application.Check your Operating Sytem's security configuration when you connect from a remote machine.

Summary

This article has shown you how to use the EJB features of the Apache Geronimo. It has provided step-by-step instructions to build an application, deploy and run it to elaborate those features.

Following are some of the highlights of the article.

Apache Geronimo is a J2EE 1.4 Certified application server and it provides all the necessary features to Enterprise applications.