Enterprise JavaBeans was recently voted "Best Java Book" by the editors and readers of Java Developer's Journal. Readers of JavaPro named it the "Best Java Book for Experts." And Amazon.com included it in the Top Computer Books for 2000. Now the best only gets better! In the new 3rd edition, Enterprise JavaBeans has been completely revised and updated with a thorough introduction to the new 2.0 version of the EJB specification. Significantly different from the earlier version, the 2.0 specification introduces three dramatic improvements: A completely new version of container-managed persistence; local interfaces; and a totally new kind of bean called the "message driven bean."The new version of container-managed persistence (CMP) beans in 2.0 is more portable and robust than in the older 1.1 version. Most significant is the introduction of the relationship fields, which allow entity beans to declare relationships with each other as natural references. In order to make this huge leap in component relationships possible, EJB 2.0 had to redesign how entity beans are defined and interact. Our new 3rd edition examines this critical CMP model in detail.Local interfaces are thoroughly discussed as well. Local interfaces allow beans that are co-located to interact without the overhead of remote method calls. This improves the performance of beans considerably and complements the CMP relationship fields.Message driven beans are a new kind of enterprise bean based on asynchronous messaging and the Java Message service (JMS). Instead of responding to Java RMI calls, message driven beans process JMS messages sent by messaging clients. An entire chapter is devoted to message-driven beans and how to use them effectively.In addition, the 3rd edition contains an architecture overview, information on resource management and primary services, design strategies, and XML deployment descriptors.

Colophon

Richard Monson-Haefel

Richard Monson-Haefel is the author of Enterprise JavaBeans, 3rd Edition, Java Message Service and one of the world's leading experts and book authors on Enterprise Java. He is the lead architect of OpenEJB, an open source EJB container used in Apple Computer's WebObjects plateform, and has consulted as an architect on J2EE, CORBA, Java RMI and other distributed computing projects over the past several years.

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animals on the cover of Enterprise JavaBeans, Third Edition are a wallaby and her joey. Wallabies are middle-sized marsupials belonging to the kangaroo family (Macropodidae, the second-largest marsupial family). They are grazers and browsers, native to Australia and found in a variety of habitats on that continent. Female wallabies have a well-developed anterior pouch in which they hold their young. When they are born, the tiny, still-blind joeys instinctively crawl up into their mother's pouches and begin to nurse. They stay in the pouch until they are fairly well-grown. A female wallaby can support joeys from up to three litters at once: one in her uterus, one in her pouch, and one that has graduated from the pouch but still returns to nurse.Like all Macropodidae, wallabies have long, narrow hind feet and powerful hind limbs. Their long, heavy tails are used primarily for balance and stability and are not prehensile. Wallabies resemble kangaroos, but are smaller: they can measure any-where from less than two feet to over five feet long, with the tail accounting for nearly half of their total length. Oddly enough, although they can hop along quite quickly (reaching speeds of up to 50 km/h), it is physically impossible for wallabies to walk backward!The three main types of wallaby are brush, rock, and nail-tailed. There are 11 species of brush wallaby (genus Macropus), including the red-necked and pretty-faced wallabies, and 6 named species of rock wallaby (Petrogale). Brush wallabies usually live in brushland or open woods. Rock wallabies, which are notable for their extreme agility, are usually found among rocks and near water. There are only three species of nail-tailed wallaby (Onychogalea), which are so named because of the horny growth that appears on the tip of their tails. Two of these species are endangered-although they were once the most numerous type of wallaby, their numbers have been seriously depleted by foxes and feral cats. Aside from hunting and habitat destruction, predation and competition by introduced species such as these is the primary threat wallabies face today. Rachel Wheeler was the production editor and copyeditor for Enterprise JavaBeans, Third Edition. Nicole Arigo was the proofreader, and Darren Kelly provided quality control. Kimo Carter, Edie Shapiro, and Leanne Soylemez provided production assistance. Brenda Miller wrote the index.Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is an original engraving from The Illustrated Natural History: Mammalia, by J.G. Wood, published in 1865. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.Melanie Wang designed the interior layout, based on a series design by David Futato. Neil Walls converted the files from Microsoft Word to FrameMaker 5.5.6 using tools created by Mike Sierra. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Rachel Wheeler.

In general the book is good. But there are several coding errors which I am smart enough to correct. The subject matter was well explained but I think it would be better if the author gave an example by which a Servlet (or JSP) accesses the EJB, not just a simple DOS application.

One the one hand, this book teaches you all about EJB, so it does what it is promised.

On the other hand, the book is full of repetition, using the exact same words over and over again. This makes it hard to not fall asleep at some point.

What disturbed me most however, is that the book is full of coding errors. Most sample code doesn't work. Often it will not even compile, because of some syntactic error. I'm smart enough to fix those errors myself, but that doesn't mean that it's okay. I used to think all O'Reilly books were excellent because they were published by O'Reilly. After reading this book, I'm sorry to say this is no longer true.

This is an excelent book about the Enterprise JavaBeans generally. But I suggest oversteping or only skimming first three chapters because they talk too much about RMI, CORBA and other technologies laying in the background of the whole EJB framework. (Of course, everybody has to know what's going on in the background, but there are other books majored in field of RMI and CORBA). I wanted to read all pages from the first one to the last one but almost broke my teeth until reached the fourth or fifth chapter. Starting from e.g. sixth chapter book shows how to use EJB or write enterprise application using EJBs (not how to write EJB containers!), and that's most of us wanted from this book. Finally, this book can be strongly recommended to all developers willing to start with EJB and enterprise application development.

All in all, this book is very well written, especially if compared to other books in similar titles. Concepts are explained concisely and no extra irrelevant materials covered. That said, it still can improved in two areas:

1. This book is very useful if you read it together with the companion wookbooks. The book I read was for weblogic, which, unfortunately, was kind of out dated. It took a while to get the first example up and running. After that, the rest is quite smooth.

2. The later part of the book, starting from chapter 12, seems to be done more in a rush. Even the writing style was kind of different from earlier chapters. Also there were quite some repetitions that probably could be omitted and replaced with more elaboration and examples of the topics.

Simply *the* book to read if you are going to use J2EE. Only problem is how to actually implement the stuff :-) Having used the book for 12 months in various projects, I have managed with the documentation supplied by the container vendors, like for instance JBoss and WebSphere, but I have really, really missed the work book.

I would have rated this book as "Definitive" if it had not been for the missing work book :-)