This book is organized into two parts: the technical manuscript followed by the JBoss workbook. The technical manuscript explains what EJB is, how it works, and when to use it. The JBoss workbook provides step-by-step instructions for installing, configuring, and running the examples from the manuscript on the JBoss 3.0 Application Server.
The technical manuscript is covered in Chapters 1-19 and is about 90% of the content for this book. Chapter 1-Chapter 18 were written by yours truly, Richard Monson-Haefel, while Chapter 19 was written by Keyton Weissenger and Shy Aberman. Here is a summary of these chapters and their content.
This chapter defines component transaction monitors and explains how they form the underlying technology of the Enterprise JavaBeans component model.
This chapter defines the architecture of the Enterprise JavaBeans component model and examines the difference between the three basic types of enterprise beans: entity beans, session beans, and message-driven beans.
This chapter explains how the EJB-compliant server manages an enterprise bean at runtime.
This chapter walks the reader through the development of some simple enterprise beans.
This chapter explains in detail how enterprise beans are accessed and used by remote, local, and web service client applications.
This chapter provides an explanation of how to develop basic container-managed entity beans.
This chapter picks up where Chapter 6 left off, expanding your understanding of container-managed persistence to complex bean-to-bean relationships.
This chapter addresses the Enterprise JavaBeans Query Language (EJB QL), which is used to query EJBs and to locate specific entity beans in EJB 2.1 and 2.0 container-managed persistence.
This chapter covers the development of bean-managed persistence beans including when to store, load, and remove data from the database.
This chapter covers the general protocol between an entity bean and its container at runtime and applies to both container-managed persistence and bean-managed persistence.
This chapter shows how to develop stateless and stateful session beans.
This chapter shows how to develop message-driven beans in EJB 2.1 and 2.0.
This chapter shows how to use the Timer service in EJB 2.1
This chapter explains Web services standards, XML, SOAP, WSLD, and UDDI.
This chapter discusses how Web services are supported in EJB using the JAX-RPC API.
This chapter provides an in-depth explanation of transactions and describes the transactional model defined by Enterprise JavaBeans.
This chapter provides an overview of J2EE v1.4 and explains how EJB 2.1 fits into this new platform.
This chapter provides an in-depth explanation of the XML deployment descriptors used in EJB 2.0 and 2.1.
This chapter provides some basic design strategies that can simplify your EJB development efforts and make your EJB system more efficient.
The JBoss workbook is an update of the JBoss workbook that was published as a supplement to the third edition of this book. The JBoss workbook shows how to execute the examples from this book on the JBoss 4.0 Application Server. It’s indispensible to readers who want to code while learning and see the examples from the book run on a real application server.
The previous edition of this book published the JBoss Workbook as a separate title along with three other workbooks for J2EE 1.3 SDK, IBM WebSphere and BEA WebLogic. All of the workbooks were critical successes and popular with readers, but they were not a very big commercial success—you could download them for free—and were difficult to manage. For this edition, we decided to develop one workbook to reduce expenses. We also decided to bind it with the rest of the book to make your life easier—you don’t have to buy it separately or download it off the Web.
The JBoss workbook is really excellent and I’m proud to include it in this book. It was written by Bill Burke and Sacha Labourey, two of the people behind JBoss and acknowledged experts in their fields. That said, I want to make it clear to readers that I’m not endorsing JBoss over other J2EE application servers. The JBoss workbook is included in this edition for pragmatic reasons:
JBoss supported most, if not all, EJB 2.1 features when this book was in the final weeks of development—most of the other vendors did not.
Bill Burke and Sacha Labourey were willing to commit the time and effort to update their workbook and have it ready for in time for printing. They are also willing to keep it updated as new JBoss versions come out.
JBoss is free, and in a time when application servers cost tens, if not hundreds of thousands of dollars to deploy, it’s a better choice for developers who are learning how to develop EJB for the first time.
The JBoss workbook shows how to execute examples from most of the chapters in this book—basically any chapter with at least one significant example is covered by the workbook. You’ll want to read the introduction to the workbook to set up JBoss and configure it for the examples. After that, just go to the workbook chapter that matches the chapter you’re reading. For example, if you are reading Chapter 6 on basic container-managed persistence, use the “Chapter 6 Exercises” section of the workbook to develop and run the examples on JBoss.