O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.3. Example: a directory-server mapping EJB

In keeping with the spirit of EJB 2.0, which says that entity EJBs that map to databases are best handled by CMP, this article demonstrates the use of an entity EJB to represent personal data in a directory server. It’s a serious example, with about 1,200 lines of code, only snippets of which will be presented here. Full source code is available, as always, on the book Web site www.kevinboone.com/ejb_book.

This example demonstrates the following features of entity EJB design.

  • The use of ‘home methods’ to handle ‘class level’ entity operations (i.e., operations carried out on no particular instance).

  • The use of a DAO with an abstract method schema to decouple EJB operations from the data store.

  • Implementation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required