You will create specific types of EJB as you progress through the book. However, the creation of EJBs follows the same steps and principals for all types of EJB.
As you may have gathered from the previous discussion on EJB contents, the EJB developer must go through the following cycle:
Design and define the business interface. This may involve mapping from a UML model of the solution into Java.
Decide on a bean type appropriate to the task in hand. Entity, Session, and Message-driven beans all have their own pros and cons. If you choose to use a Session bean, another question is whether to use a stateful Session bean or a stateless Session bean. Choice of the appropriate type is discussed ...