Enterprise JavaBeans

( 3 )


Enterprise JavaBeans, Fourth Edition, is the definitive guide to EJB 2.1. It shows you how to build complex, mission-critical systems using snap-together software components that model business objects and processes. EJB 2.1 makes several important steps forward in EJB technology: message-driven beans are much more flexible, a time service has been added, and EJBs have been integrated with web services. Enterprise JavaBeans delivers on a promise that was astonishing a few years ago: not only can EJBs run without ...
See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (24) from $1.99   
  • New (5) from $4.50   
  • Used (19) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
Seller since 2015

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

2004 Trade paperback 4th ed. New. Trade paperback (US). Glued binding. 763 p. Contains: Illustrations.

Ships from: San Mateo, CA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2010

Feedback rating:


Condition: New
059600530X BRAND NEW. We are a tested and proven company with over 900,000 satisfied customers since 1997. We ship daily M-F. Choose expedited shipping (if available) for much ... faster delivery. Delivery confirmation on all US orders. Read more Show Less

Ships from: Nashua, NH

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2008

Feedback rating:


Condition: New

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2008

Feedback rating:


Condition: New

Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


Enterprise JavaBeans, Fourth Edition, is the definitive guide to EJB 2.1. It shows you how to build complex, mission-critical systems using snap-together software components that model business objects and processes. EJB 2.1 makes several important steps forward in EJB technology: message-driven beans are much more flexible, a time service has been added, and EJBs have been integrated with web services. Enterprise JavaBeans delivers on a promise that was astonishing a few years ago: not only can EJBs run without modification on any operating system, they can run on any J2EE application server. However, after writing EJBs, you have to deploy them in an application server, and deploying EJBs can be a painful task. This edition includes the JBoss Workbook, which shows you how to deploy the examples on the open source JBoss Application Server. If you've done any enterprise software development in the past few years, you already know the extent to which EJB has changed the field. Use this book to catch up on the latest developments. If you're new to enterprise software development, or if you haven't been working with EJB, this book will bring you up to speed on this exciting technology for building business systems.
Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
With the new EJB 2.0 spec, Enterprise JavaBeans becomes an even powerful platform for enterprise and web development. Richard Monson-Haefel has just updated his #1 EJB guide to reflect the new spec. But whether you're on the bleeding edge or involved in projects based on EJB 1.1, this book is just your ticket.

Monson-Haefel offers expert insight into EJB architecture, design, and coding. You'll find detailed coverage of EJB primary services, entity relationships, queries, session beans, transactions, and more. Wherever possible, Monson-Haefel provides code that's downward compatible, and he carefully explains the key differences between 1.1 and 2.0.

Sun has thoroughly overhauled container-managed persistence, simplifying the development of portable, database-independent applications. Monson-Haefel covers the 2.0 model in detail, while also covering EJB 1.1's approach. EJB 2.0 thoroughly integrates Java Message Service (JMS), helping EJBs participate more fully in loosely-connected web apps. Monson-Haefel, who coauthored O'Reilly's recent JMS guide, offers a full chapter on EJB 2.0's JMS support.

No EJB book has been honored as widely as Enterprise JavaBeans. The new edition is as indispensable as its predecessors. (Bill Camarda)

Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. He served for nearly ten years as vice president of a New Jersey–based marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.

Gregory V. Wilson

Enterprise JavaBeans (EJBs) may be the clumsiest name that our industry has come up with recently -- but the technology is anything but. Enterprise JavaBeans combines distributed components with transaction monitors to produce an infrastructure that can manage database-style transactions, security, object persistence, and resource management in a standardized way. Enterprise JavaBeans has nothing in common with plain ol' JavaBeans except its name, and it is much more similar to the Microsoft Transaction Server (MTS).

Richard Monson-Haefel's Enterprise JavaBeans starts by describing the historical and technological background to EJB, including the development of transaction monitors over the last 30 years, and the underpinnings of distributed-object technology. Chapter 2 then looks at the EJB architecture, while Chapter 3 discusses resource management. As part of this discussion, Monson-Haefel looks at how EJB handles the six primary services defined by the OMG: concurrency, transactions, persistence, distributed objects, naming, and security. This discussion is informative, but noncritical -- the book never suggests that EJB has weaknesses, or that a different approach to some technical problem (or more rigorous standardization) might have been more flexible or easier to implement.

Chapter 4 describes how to implement some simple EJBs. As with other examples in the book, most of this material is taken from a system to manage bookings for a holiday cruise line. Chapters 5 through 8 then discuss how EJBs are used by client-size applications, the development of entity beans (that is, components that describe real-world objects such as cruise ships), session beans (which describe business logic such as the booking of a cruise) and EJB's support for transaction management. The last chapter, "Design Strategies," then gives some tips on how to go about developing EJB-based applications. The book closes with three appendices: One on the EJB API, one (which I found very helpful) that gives UML state and sequence diagrams for various operations, and one (which is already out of date) that provides information about EJB vendors.

Enterprise JavaBeans is well written, and well edited: I did not notice any awkward sentences, typographical errors, or ugly diagrams. In addition, Monson-Haefel's examples are easy to follow. His discussion of technical issues is clear, but would have been better, in my opinion, if it had been a little more critical, or if it made more comparisons between EJB and other systems. (One of the things that makes Szyperski's Component Software such an excellent book is the way its author does precisely these things.) Overall, Enterprise JavaBeans is a good starting point for anyone who is interested in the subject, and a reasonable reference for anyone who is already in the middle of an EJB project.
Electronic Review of Computer Books

Read More Show Less

Product Details

  • ISBN-13: 9780596005306
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 6/28/2004
  • Edition description: Fourth Edition
  • Edition number: 4
  • Pages: 792
  • Product dimensions: 6.96 (w) x 9.16 (h) x 1.42 (d)

Meet the Author

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.

Read More Show Less

Read an Excerpt

Chapter 13: Message-Driven Beans

This chapter is divided into two subsections: "JMS as a Resource" and "Message-Driven Beans." The first section describes the Java Message Service (JMS) and its role as a resource that is available to any enterprise bean (session, entity, or message-driven). Readers unfamiliar with JMS should read the first section before proceeding to the second section.

The second section in this chapter provides an overview of the new enterprise bean type--the message-driven bean. A message-driven bean is an asynchronous bean activated by message delivery. In EJB 2.0, vendors are required to support JMS-based message-driven bean, that receive JMS messages from specific topics or queues and process those messages as they are delivered.

All EJB 2.0 vendors must, by default, support a JMS provider. Most EJB 2.0 vendors have a JMS provider built in, but some may also support other JMS providers. Regardless of how the EJB 2.0 vendor provides the JMS service, having one is a requirement if the vendor expects to support message-driven beans. The advantage of this forced adoption of JMS is that EJB developers can expect to have a working JMS provider on which messages can be both sent and received.

JMS as a Resource

JMS is a standard vendor-neutral API that is part of the J2EE platform and can be used to access enterprise messaging systems. Enterprise messaging systems (a.k.a. message-oriented middleware) facilitate the exchange of messages among software applications over a network. JMS is analogous to JDBC: whereas JDBC is an API that can be used to access many different relational databases, JMS provides the same vendor-independent access to enterprise messaging systems. Many enterprise messaging products currently support JMS, including IBM's MQSeries, BEA's WebLogic JMS service, Sun Microsystems' iPlanet Message Queue, and Progress' SonicMQ, to name a few. Software applications that use the JMS API for sending or receiving messages are portable across brands of JMS vendors.

Java applications that use JMS are called JMS clients, and the messaging system that handles routing and delivery of messages is called the JMS provider. A JMS application is a business system composed of many JMS clients and, generally, one JMS provider.

A JMS client that sends a message is called a producer, while a JMS client that receives a message is called a consumer. A single JMS client can be both a producer and a consumer. When we use the term consumer or producer, we mean a JMS client that receives messages or sends messages, respectively.

In EJB, enterprise beans of all types can use JMS to send messages to various destinations. Those messages are consumed by other Java applications or message-driven beans. JMS facilitates sending messages from enterprise beans by using a messaging service, sometimes called a message broker or router. Message brokers have been around for a couple of decades--the oldest and most established being IBM's MQSeries--but JMS is fairly new and is specifically designed to deliver a variety of message types from one Java application to another.

Reimplementing the TravelAgent EJB with JMS

We can modify the TravelAgent EJB developed in Chapter 12 so that it uses JMS to alert some other Java application that a reservation has been made. The following code shows how to modify the bookPassage( ) method so that the TravelAgent EJB will send a simple text message based on the description information from the TicketDO object:

public TicketDO bookPassage(CreditCardDO card, double price)
   throws IncompleteConversationalState {
   if (customer == null || cruise == null || cabin == null) {
       throw new IncompleteConversationalState(  );
   try {
       ReservationHomeLocal resHome = (ReservationHomeLocal)
       ReservationLocal reservation =
           resHome.create(customer, cruise, cabin, price, new Date(  ));
       Object ref = jndiContext.lookup
       ProcessPaymentHomeRemote ppHome = (ProcessPaymentHomeRemote)
           PortableRemoteObject.narrow(ref, ProcessPaymentHomeRemote.class);
       ProcessPaymentRemote process = ppHome.create(  );
       process.byCredit(customer, card, price);
       TicketDO ticket = new TicketDO(customer,cruise,cabin,price);

       String ticketDescription = ticket.toString(  );

       TopicConnectionFactory factory = (TopicConnectionFactory)



       Topic topic = (Topic)


       TopicConnection connect = factory.createTopicConnection(  );

       TopicSession session = connect.createTopicSession(true,0);

       TopicPublisher publisher = session.createPublisher(topic);

       TextMessage textMsg = session.createTextMessage(  );



       connect.close(  );
       return ticket;
   } catch(Exception e) {
       throw new EJBException(e);


To be able to send a message, we needed to add a lot of new code. However, while it may look a little overwhelming at first, the basics of JMS are not all that complicated.

TopicConnectionFactory and Topic

In order to send a JMS message we need a connection to the JMS provider and a destination address for the message. The connection to the JMS provider is made possible by a JMS connection factory; the destination address of the message is identified by a Topic object. Both the connection factory and the Topic object are obtained from the TravelAgent EJB's JNDI ENC:

TopicConnectionFactory factory = (TopicConnectionFactory)

Topic topic = (Topic)

The TopicConnectionFactory in JMS is similar in function to the DataSource in JDBC. Just as the DataSource provides a JDBC connection to a database, the TopicConnectionFactory provides a JMS connection to a message router.1

The Topic object itself represents a network-independent destination to which the message will be addressed. In JMS, messages are sent to destinations--either topics or queues--instead of directly to other applications. A Topic is analogous to an email list or newsgroup; any application with the proper credentials can receive messages from and send messages to a Topic. When a JMS client receives messages from a Topic, the client is said to subscribe to that Topic. JMS decouples applications by allowing them to send messages to each other through a destination, which serves as virtual channel. This example uses a Topic type destination, but JMS also supports Queue type destinations. The difference between these types is explained in more detail later.

TopicConnection and TopicSession

The TopicConnectionFactory is used to create a TopicConnection, which is an actual connection to the JMS provider...

Read More Show Less

Table of Contents


Lay of the Land

Chapter 1: Introduction

Chapter 2: Architectural Overview

Chapter 3: Resource Management and the Primary Services

Chapter 4: Developing Your First Enterprise Beans

Chapter 5: The Remote and Local Client View

Chapter 6: CMP: Basic Persistence

Chapter 7: CMP: Entity Relationships

Chapter 8: CMP: EJB QL

Chapter 9: Bean-Managed Persistence

Chapter 10: The Entity-Container Contract

Chapter 11: Session Beans

Chapter 12: Message-Driven Beans

Chapter 13: Timer Service

Chapter 14: EJB 2.1: Web Service Standards

Chapter 15: EJB 2.1 and Web Services

Chapter 16: Transactions

Chapter 17: J2EE

Chapter 18: XML Deployment Descriptors

Chapter 19: EJB Design in the Real World

JBoss Workbook

Chapter 20: Introduction

Chapter 21: JBoss Installation and Configuration

Chapter 22: Exercises for Chapter 4

Chapter 23: Exercises for Chapter 5

Chapter 24: Exercises for Chapter 6

Chapter 25: Exercises for Chapter 7

Chapter 26: Exercises for Chapter 8

Chapter 27: Exercises for Chapter 9

Chapter 28: Exercises for Chapter 11

Chapter 29: Exercises for Chapter 12

Chapter 30: Exercises for Chapter 13

Chapter 31: Exercises for Chapter 15

Database Configuration


Read More Show Less

Customer Reviews

Average Rating 4.5
( 3 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 4 Customer Reviews
  • Anonymous

    Posted August 5, 2004

    Check out the JBoss workbook

    A REVIEW OF THE FOURTH EDITION] Each edition of this book seems to grow visibly thicker. Perhaps indicative of the still increasing functionality being put into EJBs. The book covers what is currently the latest version, EJB 2.1. Plus also EJB 2.0. Comprehensive. Detailed explanations of Container Managed Persistence and Bean Managed Persistence. Plus how to use Message-Driven Beans and JMS to help put together a loosely coupled distributed system. MDBs and JMS did not exist in the original EJBs. But a clear sense of the need for such emerged soon after, and MDB and JMS were the results. With the flurry of interest on Web Services, we see how EJB 2.1 is compatible with these proposed standards. In future editions, this section may well be heavily expanded. Right now, Web Services are still nascent and more experience is needed with fleshing out optimal standards. Kudos to the authors for including a lengthy section showing how to use JBoss. It is a free application server that supports most EJB 2.1 features. Its zero cost and advanced functionality will appeal to many programmers on a tight budget. This section walks you through combining JBoss with EJBs.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 16, 2001

    Excellent Book!!!!!

    This is an excellent book if you want to gain thorough knowledge on EJBs. It is organized very well and the current edition fully covers EJB 1.1. Go for it!!!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 31, 2000

    good reading

    good treatment to the subject. Not very verbose. differences between 1.0 and 1.1 are clarified. Good examples.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 12, 2000

    not clear and not easy to understand

    This EJB book is very popular and the first one I read. I brought this book because I need to use ejb next weeks. But this book does not help me a lot. It has almost all the import stuff, but very badly organized. It is hard to understand the concept since it always give new and not well defined concept I had three days' hard time until my collegue give another book, ' Enterprise Javabeans' by Tom Valesky, published by Addison-Wesley. Valesky's book is great. Very well organized, concept explained very clear. And it starts with very simple example. So I strongly recommend Tome Valesky's book not this one

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 4 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)