State Diagrams

A state diagram describes the life history of objects of a given class.

A state diagram is used to show the following:

  • The state space of a given class

  • The events that cause a transition from one state to another

  • The actions that result from a state change

A state diagram is a directed graph of states connected by transitions.

State Notation

A state is a condition in which an object can reside during its lifetime while it satisfies some condition, performs an activity, or waits for an event. A state icon is a rounded rectangle with a name and a compartment.

For example, Figure D.7 shows the state diagram of a stateful session bean instance. It consists of three states: Instance does not exist, Ready, and Passive.

Figure D.7. State ...

Get Sams Teach Yourself EJB in 21 Days 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.