O'Reilly logo

Java Enterprise in a Nutshell, Third Edition by William Crawford, Jim Farley

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

EJB 3.0

The 3.0 version of the EJB specification is currently in draft form and should be released in final form shortly after this book hits the shelves. Early versions of EJB 3.0 implementations have started to appear already. In anticipation of the eventual wide availability of EJB 3.0 containers, we provide a short introduction to the new programming model introduced in the 3.0 specification.

The biggest complaint by developers about the current EJB programming model (Version 2.1) is that it is just too complex. Several Java interfaces and classes have to be written for each EJB, and configuration details have to be supplied in the form of an XML deployment descriptor. And that’s after you’ve figured out the various rules and contracts for implementing container callbacks, using container services, and so on. Some projects find the benefits of the EJB container services to be worth it, and their developers work through the EJB complexities to get these benefits. But many developers have found other, simpler solutions to get these services. The most notable “EJB competitor” has been Hibernate, discussed in Chapter 20. Hibernate presents a much simpler programming model for handling object/relational persistence in enterprise applications, and many developers have voted with their feet and gone down the path of least resistance.

It’s not surprising, then, that the primary goal in writing the EJB 3.0 specification was simplification. The specification leads listened to the critics, ...

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