EJB Design

Now let's explore the details of each EJB type. We'll first look at how beans are designed and then focus on examples of their implementation. Based on their purpose and capabilities, we'll see that our rough mapping of requirements to beans is in fact reasonable.

Session Beans

Session beans correspond to business tasks primarily related to interactive sessions. When an end user or client wants to execute some action, such as appending to an order, he routes his request to a session bean. It's sometimes helpful to think of a session bean roughly as the device through which a logical connection to an application is established between client and server.

Session EJBs come in two flavors: stateful and stateless. As the name implies, ...

Get Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology 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.