Chapter 4. A Session Bean Example

Dale Green

Session beans are powerful because they extend the reach of your clients into remote servers—yet they’re easy to build. In Chapter 2, you built a stateless session bean named ConverterEJB. This chapter examines the source code of a stateful session bean called CartEJB.

In This Chapter

The CartEJB Example

Session Bean Class

Home Interface

Remote Interface

Helper Classes

Running the CartEJB Example

Other Enterprise Bean Features

Accessing Environment Entries

Comparing Enterprise Beans

Passing an Enterprise Bean’s Object Reference

Get J2EE™ Tutorial, The 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.