March 2002
Intermediate to advanced
464 pages
8h 51m
English
Well, we've certainly done a lot of work to create and deploy our EJB. Now let's show you a client that uses it.
Our first example is a stand-alone Java application that runs on a client machine. We use a command-line interface to keep the client simple. The program accesses our Loan EJB running in the business tier, possibly on a different machine.
The client program hard-codes loan values and invokes methods in the Loan remote interface. We create a Loan Value Object (LoanVO) with $90,000 for the loan amount, 6.85 % for the interest rate, and 15 years for the term. Because we don't provide a start date, the LoanVO constructor uses today's date.
The first part of the client program calls monthly_payment() ...
Read now
Unlock full access