Throughout this chapter, we'll discuss EJBs in the context of a simple employer benefits-processing system. The goal is a system that allows members to iteratively choose benefits. In addition, an alternative interface enables enrollments to be processed in batch mode. Our sample application has the following requirements:
Members can select and deselect benefits.
The current benefit listing for any member can be obtained.
Batch enrollment of member benefit elections is possible.
Notice how these features can be neatly mapped into the EJB types I introduced earlier. Iterative member enrollment is the main business task, so it can be handled by a session bean—let's call it BenefitEnroller. Batch enrollment is a business task, ...