Icon Enterprise JavaBeans (2nd Edition) Icon
Book Review

by Dale Farris, President, Golden Triangle PC Club
May 2000

In 1999, the Java Developer's Journal gave the first edition of Richard Monson-Haefel's "Enterprise JavaBeans (EJB)" the Editor's Choice Award for Best Java Book of 1999. Building on this success, author Monson-Haefel now releases a superb update to this work, "Enterprise JavaBeans, 2nd Edition (EJB)."

The programming language, Enterprise JavaBeans (EJB), versions 1.1 and 1.0, is an important technology for server-side application development in Java. This is the underlying software that in many cases is used to create those neat little Java Applets that pop up in today's newer versions of Web browsers, as well as used to create more fundamental applications. During this current very dynamic nature of emerging Internet technologies, the Java programming language has emerged as an excellent platform for creating enterprise solutions, specifically for developing distributed server-side applications. This shift has much to do with the emerging role of Java as a universal language for producing implementation-independent abstractions for common enterprise technologies.

At one point in the recent past, the large Corel Corporation, maker of Corel WordPerfect, Corel Draw, and many other applications, developed a version of their very successful WordPerfect program to run in Java, although as of this writing, they have pulled back from the release of this program. Using the programming language Java to create an application means the program can run on many different computer platforms, and is not necessarily dependent on only one operating system, such as Windows, for example. This highly important language, Java, has continued to spawn even more derivatives that are building on this cross-platform functionality and represents the basic driving force behind Enterprise JavaBeans (EJB).

EJB is the latest technology abstraction in the Java family, and perhaps the most ambitious. EJB provides an abstraction for component transaction monitors (CTM), and these CTM's represent the convergence of two technologies: traditional transaction processing monitors, such as CICS or TUXEDO, and distributed object services, such as DCOM, CORBA and native Java RMI. 

EJB defines a server-side component model that allows business objects to be developed and moved from one brand of CTM to another. A component (a Java bean) presents a simple programming model that allows the developer to focus on its business purpose. An EJB server (a CTM that conforms to the Enterprise JavaBeans specifications) is responsible for making the component a distributed object and for managing services such as transactions, persistence, concurrency and security.

The end result is that EJB makes developing distributed component systems, that are managed in a robust transactional environment, much easier. For developers and corporate IT shops that have struggled with the complexities of delivering mission-critical, high performance distributed systems using CORBA, DCOM, or Java RMI, EJB provides a far simpler and more productive platform on which to base development efforts.

In short, EJB provides a standard distributed component model that greatly simplifies the development process and allows beans that are developed and deployed on one vendor's EJB server to be easily deployed on a different vendor's EJB server. 

EJB allows you to build complex systems using snap-together software components that model business objects and processes. EJB greatly simplifies the process of development by taking care of issues like object persistence, security and transaction management.

EJB delivers on a promise that was astonishing just a few years ago, namely that EJB can not only run without modification on any operating system, but could run without modification within any EJB enterprise server. 

In this excellent 2nd edition, Monson-Haefel continues to improve an already strong work in this highly specialized field, helping users learn how to develop EJB to model their business and how to use the beans in clients. He has produced an essential guide for those heavily involved in using Java in their company to work on enterprise software development projects.

About the Author

Monson-Haefel is a leading expert in EJB, and is currently the lead architect for OpenEJB (www.exolab.org), an open source EJB server, and is an independent consultant working in distributed enterprise computing. In this second edition to his well received first release, Monson-Haefel provides the definitive guide to EJB, incorporating the latest developments in EJB technology. Over the past few years, Monson-Haefel has consulted as an architect on EJB, CORBA, Java RMI, and other Java projects. He has also published numerous articles in national magazines, speaks at symposiums on EJB, and was a contributing author on "Special Editions: Using JavaBeans," from Ziff-Davis. He also maintains a web site for the discussion of Enterprise JavaBeans and related distributed computing technologies, at www.EJBNow.com

Target Readers

This wonderful work explains and demonstrates the fundamentals of EJB architecture. Although EJB makes distributed computing much simpler, it is still very complex technology and is certainly NOT for computer novices nor those brand new to writing programming languages.

Even though the book provides a straightforward, no-nonsense explanation of the underlying technology, Java classes and interfaces, component model, and runtime behavior of EJB, this programming language will require a great deal of time to master. Although the book focuses on the fundamentals, this is no "dummy" book. EJB embodies an extremely complex and ambitious enterprise technology, and while using EJB may be fairly simple, the amount of work required to truly understand and master EJB is very significant.

Those reading this book should first be very fluent with the Java language and have some practical experience developing business solutions. Experience with distributed object systems is not a must, but a reader will need some experience with JDBC, or at least an understanding of the basics, in order to follow the many examples in the book. 

For those unfamiliar with Java, this is NOT the book to begin. Instead, author Monson-Haefel suggests you read "Learning Java" by Patrick Neimeyer and Jonathan Knudsen, formerly titled "Exploring Java," from O'Reilly & Associates. For familiarity with JDBC, he recommends "Database Programming with JDBC and Java," by George Reese, from O'Reilly & Associates. For a background in distributed computing, he suggests "Java Distributed Computing," by Jim Farley, from O'Reilly & Associates.

Versions Covered

This updated second edition covers Enterprise JavaBeans version 1.1 and 1.0, including all optional features. EJB uses Java language features from the Java 1.1 platform and JDBC. Because the focus of the book is to develop vendor-independent EJB components and solutions, the author stays away from proprietary extensions and vendor-dependent idioms. Any EJB-compliant server can be used with the book, although the reader will need to be familiar with the server's specific installation, deployment, and runtime management procedures to work with the examples in the book.

The book covers both EJB 1.1 and EJB 1.0. Both versions have a lot in common, but when the features differ, the text clearly marks the differences. 

The examples used in the book are accessible from an O'Reilly FTP site:

ftp://ftp.oreilly.com/pub/examples/java/ejb

Once again, the famous O'Reilly emphasis on a common-sense approach to explaining very technical material, depth of detail, and focus on the practical, has resulted in yet another very useful O'Reilly text that is very relevant to anyone working in Java. Their always nice RepKover binding, a durable and flexible lay-flat binding, really helps here. The book can be laid flat for ease of access to both pages, with no fear of the book always closing on you just as you get to the next sentence.

Summary of Table of Contents

The eleven (11) chapters cover an introduction to Enterprise JavaBeans (EJB), an overview of the architecture of EJB, resource management and the primary services, developing your first enterprise beans, the client view, entity beans, session beans, transactions, design strategies, XML deployment, and Java 2, Enterprise Edition.

The appendixes cover the Enterprise JavaBeans API, state and sequence diagrams, EJB vendors, and new features in EJB 1.1.

Key Topics Covered

Enterprise JavaBeans 1.1 and 1.0
Developing entity beans and session beans
Container and bean managed persistence
XML deployment descriptors
The JNDI Enterprise Naming Context (ENC)
Transaction management
Design strategies
Bean life cycle
Relationship between EJB and Java 2, Enterprise Edition (J2EE)

Book Contents

491 pages; diagrams, figures, tables; extensive programming protocols; appendixes; index; about the author; cover colophon  

Author

Richard Monson-Haefel

ISBN

March 2000:  Second Edition
1-56592-869-5

List Price


$34.95

Publisher


Contact: Lisa Mann
1-707-829-0515, ext 230
O'Reilly & Associates, Inc.
101 Morris Street
Sebastopol, California 95472
1-800-998-9938
1-707-820-0515
FAX 1-707-829-0104
www.oreilly.com