The variable cart contains a reference to the remote EJBObject, which is created by create. This example creates a new session bean. The reference to the EJBObject is used to call the remote methods. |
ShoppingCartEJB cart = |
cartHome.create("Emma", "0507"); |
cart.addItem(100); |
cart.addItem(251); |
cart.purchase(); |