Part V. Examples

This section is dedicated to the examples of concepts covered in the explanatory chapters of this edition. While EJB Specification addresses concerns in a vendor-independent way, to get code running in a real EJB container requires the use of some vendor-specific hooks for operations like startup and deployment. From this point forward, code may be geared to a particular implementation.

The online companion to this text lives at:

From this site hosted by the JBoss Community, readers are encouraged to participate in forum discussion, the issue tracker, and article comments in order to further understand EJB concepts in practice.

All examples in this book are LGPL Open-Source software, and these examples serve as a guide to users looking to run the code on their own. The examples will have a lifecycle extending beyond the book’s publishing date to account for explanations requested by users, new features, documentation updates and bug fixes.

Building from Source





JDK (Java Development Kit)

1.6.0+ (but less than 1.7.0)


Apache Maven

>= 2.0.9


Git Client


Eclipse IDE




Recommended if using Eclipse

IntelliJ IDEA


Obtain the Source Using Subversion SCM

Anonymous access

$> git clone


$> git clone

Switch into the checked-out location

$> cd oreilly-ejb-6thedition-book-examples ...

Get Enterprise JavaBeans 3.1, 6th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.