Beginning EJB 3 Application Development From Novice to Professional – Book Review

EJB
3 took its time to get mass acceptance, primarily because many Java developers
did not have great memories of earlier versions of EJB. EJB 3 is however now
gaining momentum and a number of EJB 3 books have hit the market. Beginning EJB
3 is a Beginner – Intermediate level book from Apress.

In their letter to readers, the authors say that “With EJB3, the EJB spec
developers had at last settled upon a model that really made sense. Coming from
EJB 2.x world, it was like a breath of fresh air..” So EJB 3, is widely believed
to be a significant step forward in simplifying enterprise Java development.

The book uses several examples to demonstrate the new found simplicity
of EJB 3. The free, open source application server
GlassFish, which is the reference implementation for all specifications in Java EE 5 is used in the book.

One of the important changes in EJB 3 was the introduction of annotations.
However XML descriptors are still very much around. Java development has a
tradition of always taking the most complex approach and if there isn’t one, it
works at complicating the simple approach. So after the initial excitement about
annotations, there’s again uncertainty. It’s now (Annotations) vs (XML) vs
(Annotations & XML mix). On this, the authors say “A simple rule we follow
is this – If we need to decouple our entity and bean classes from their EJB 3
metadata, as when we want to use the same entity classes with two different
inheritance strategies, we put our metadata in XML. Otherwise, we stick with
annotations” “And don’t forget…whenever metadata is specified for an element
using both XML and annotations, the XML always wins”

Chapter 1 introduces EJB 3 and gives us a quick overview of all that’s changed in EJB 3.0.
Chapter 2 looks at session beans and dives into using dependency injection in
session beans, interceptors, callbacks, local vs remote access even before
a session bean example is deployed. So the book kind of works with the
assumption that you have tried your hand or as some would say “burnt your
fingers” with an earlier version of EJB. The book runs the risk of being too
fast for someone who might be trying EJB for the first time.

Chapters 3 and 4 look at entity beans and persistence and Chapter 5 looks at
message driven beans. Chapter 6 begins with the basics of Web Services and then
moves on to the various web services specs and how you can use the @WebService
nd @WebMethod annotations to quickly get your app web services ready.

Chapter 6 to 11 deal with web services, integration,
transaction, performance and migration from version 2.1. The good thing
about these chapters is that the authors first introduce the concept,
the need and the basics and then delve into the actual development.
Problems while deploying EJB across applications servers were commonly
reported with earlier EJB versions, so it’s good that the authors have
dedicated a chapter to EJB 3 deployment and planning.

JSF has become more or less the standard for new Java web development. So
Chapter 12 is a useful one as it shows EJB client development using a simple JSF
+ EJB 3 application.

Overall, for a beginner-level book I think it
would have been good if there was more content and hand-holding in the initial
chapters, as Apress has a book “Pro EJB
3” which could look at the advanced EJB topics in detail. But if you have been on the enterprise Java scene for some time and have
tried out EJB earlier, this book will get you going with EJB 3 in no time.

Beginning EJB 3 Application Development: From Novice to Professional
By Raghu R. Kodali, Jonathan R. Wetherbee and Peter Zadrozny
ISBN: 1-59059-671-4
512 pp.
Published: Sep 2006
Price: $44.99

Related
How to decide which persistence technology to use? JDBC / CMP …
A quick look at EJB 3.0 Stateless Session Beans
Checking EJB 3.0 performance
Xtreme weekend – EJB3 and Annotations
EJB 3 In Action

The following two tabs change content below.
Content Team

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!
Content Team

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!