O'Reilly logo

Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications by Paul Anderson, Gail Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.3. Stand-alone Java Application Client

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() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required