Appendix B.  State and Sequence Diagrams

This appendix contains state and sequence diagrams for all the bean types discussed in this book: container-managed and bean-managed entity beans, stateless and stateful session beans, and message-driven beans. Although standard Unified Modeling Language (UML) is used in these diagrams, some extensions were required to model EJB runtime characteristics. In the state diagrams, for example, callback methods and class instantiation operations are shown as part of the transition event.

In the sequence diagrams, container-provided classes such as the container itself, the EJB object, and the EJB home are shown as separate classes but are also boxed together. Messages sent from classes in the container system box are considered to be sent from the container system as a whole, not necessarily from the specific container-provided class. This generalization is necessary because the container’s interaction with the bean is characterized by these classes but differs from one vendor’s implementation to the next. The exact source of the message is immaterial, as long as you realize that the container system sent it.

Entity Beans

Life Cycle State Diagram of the Entity Bean

Life-cycle state diagram of the entity bean

Figure B-1. Life-cycle state diagram of the entity bean

Sequence Diagrams for Container-Managed Persistence

Figure B-2. Creation and removal in container-managed persistence

Figure B-3. Activation ...

Get Enterprise JavaBeans, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.