Java Reference
In-Depth Information
Chapter 1. What's what in EJB 3
This chapter covers
• The EJB container and its role in Enterprise applications
• The different types of Enterprise Java Beans (EJBs)
• Closely related technologies such as the Java Persistence API (JPA)
• The different EJB runtime environments
• Innovations started with EJB 3
• New changes with EJB 3.2
One day, when God was looking over his creatures, he noticed a boy named Sadhu whose
humor and cleverness pleased him. God felt generous that day and granted Sadhu three
wishes. Sadhu asked for three reincarnations—one as a ladybug, one as an elephant, and
the last as a cow. Surprised by these wishes, God asked Sadhu to explain himself. The boy
replied, “I want to be a ladybug so that everyone in the world will admire me for my beauty
and forgive the fact that I do no work. Being an elephant will be fun because I can gobble
down enormous amounts of food without being ridiculed. I'll like being a cow the best be-
cause I'll be loved by all and useful to mankind.” God was charmed by these answers and
allowed Sadhu to live through the three incarnations. He then made Sadhu a morning star
for his service to humankind as a cow.
EJB too has lived through three major incarnations. When it was first released, the industry
was dazzled by its innovations. But like the ladybug, EJB 1 had limited functionality. The
second EJB incarnation was almost as heavy as the largest of our beloved pachyderms. The
brave souls who couldn't do without its elephant power had to tame the awesome complex-
ity of EJB 2. And finally, in its third incarnation, EJB has become much more useful to the
huddled masses, just like the gentle bovine that's sacred for Hindus and respected as a moth-
er whose milk feeds us well.
A lot of hard work from a lot of good people made EJB 3 simple and lightweight without
sacrificing Enterprise-ready power. EJB components can now be Plain Old Java Objects
(POJOs) and look a lot like code in a “Hello World” program. In the following chapters we'll
describe a star among frameworks with increasing industry adoption.
Search WWH ::




Custom Search