Consider a Bean shopping cart which lists out a set of beans (of the eating variety!) for the user to order items and store in a shopping cart. Though production-ready implementations of shopping cart handles complex scenarios, lets us abstract into a simple set of beans to demonstrate a local interface and how business logic is defined and applied.
Fig. 7.4 X2BizLocal.java—The EJB business interface
The business interface is listed out in the code shown in Figure 7.4. The interfaces are implemented in the Bean class.
Fig. 7.5 X2Biz.java—The EJB business interface logic
A few Java annotations ...