Creating the Bean

In this step we will look at the code for a simple Enterprise JavaBean.

The example, which is called 'Interest', is a simple stateless session EJB. Its job is to calculate the amount of compound interest payable on a sum of money borrowed over a specified term with a specified interest rate. In fact, there is only one functional line of code in the whole package.