10 of 10 people found the following review helpful:
2.0 out of 5 stars
A very frustrating read... Big disappointment, June 5, 2009
This review is from: Enterprise JavaBeans 3.0 (5th Edition) (Paperback)
I didn't count'em, but there's like 50 mistakes in the example code
very unprofessional
apart from that, the book is ok
it's a shame though
because I paid good money for it and
I would expect someone to revise the code thoroughly before going to print
after all... it's a programming book!
If you buy this book, don't expect a masterpiece
----------------------------------------------------
In regards to the technical errors...
halfway through the book, it was disappointing
then they're annoying,
by the end of the book it was just sad
I'll give just one of many examples, just to illustrate:
"Only session beans and message-driven beans that define
a javax.ejb.TransactionManagementType of Bean
using the @javax.ejb.TransactionManager annotation
can manage their own transactions."
... later in that same page (388):
[...]
...you won't know which is which unless you go to the API!
Like I said, it's just disappointing, annoying and sad.
It was around chapter 17, when I started wondering:
"Where this guys drinking while they were reviewing the code?"
Mistakes in the last chapter were just plain insulting:
"Figure 21-7. Stateless version of ReservationManager"
is the stateful version! Jesus Christ!
Who edited this book!
Not even the index got away clean (p. 708):
"builing and deplying example programs, 538"
and this is O'Reilly
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
7 of 7 people found the following review helpful:
5.0 out of 5 stars
Essential information for the experienced Java professional, August 4, 2006
This review is from: Enterprise JavaBeans 3.0 (5th Edition) (Paperback)
This book was released in May 2006, so all reviews earlier than that are talking about an earlier edition of this book, which is a completely different animal than this edition.
This book explains and demonstrates the fundamentals of the EJB 3.0 and Java Persistence programming models. Although EJB makes application development much simpler, it is still a complex technology that requires a great deal of time and study to master. This book provides a straightforward, no-nonsense explanation of the underlying technology, Java classes and interfaces, the component model, and the runtime behavior of EJB. It does not include material on previous versions of the specification, however.
Although this book focuses on the fundamentals, it's not an easy read. EJB is an extremely complex and ambitious enterprise technology. While using EJB may be fairly simple, the amount of work required to understand and master EJB is significant. Before reading this book, you should be fluent in the Java language and have some practical experience developing business solutions. Experience with distributed object systems is not required, but you will need some experience with JDBC to follow the examples in this book. I review this book in the context of its table of contents:
1. Introduction - Defines component transaction monitors and explains how they form the underlying technology of the EJB component model.
2. Architectural Overview - Defines the architecture of the EJB component model and examines the differences between the three basic types of enterprise beans: entity beans, session beans, and message-driven beans.
3. Resource Management and Primary Services - Explains how the EJB-compliant server manages an enterprise bean at runtime.
4. Developing Your First Beans - Walks you through the development of some simple enterprise and entity beans.
5. Persistence: EntityManager - Explains how entity beans interact with the new entity manager service. This chapter focuses on the details of the persistence service and how it can be accessed within Java EE and with regular Java programs that run outside of a Java EE environment.
6. Mapping Persistent Objects - Defines the basic relational database mapping provided by the Java Persistence specification. This chapter takes a thorough look at the process of developing entity beans--specifically, mapping them to a relational database.
7. Entity Relationships - A continuation of chapter six that expands your understanding of persistence and complex bean-to-bean relationships.
8. Entity Inheritance - Discusses entity bean inheritance and how an object hierarchy can be mapped to a relational database. This chapter modifies the Customer entity defined in earlier chapters to make it fit into an inheritance hierarchy. It extends a base class called Person and define an Employee class that extends a Customer class.
9. Queries and EJB QL - Addresses the Enterprise JavaBeans Query Language (EJB QL), which is used to query entity beans and to locate specific entity beans in Java Persistence.
10. Entity Callbacks and Listeners - This chapter discusses how you register your entity bean classes for life cycle callbacks as well as how to write entity listeners that can intercept life cycle events on your entities.
11. Session Beans - Shows how to develop stateless and stateful session beans.Session beans fill the gaps left by entity beans. They are useful for describing interactions between other beans (taskflow) and for implementing particular tasks. Unlike entity beans, session beans do not represent data in the database, but they can access data. This means that session beans can read, update, and insert data in a business process.
12. Message-Driven Beans - The message-driven bean was introduced in EJB 2.0 to support the processing of asynchronous messages from a JMS provider. EJB 2.1 expanded the definition of the message-driven bean so that it can support any messaging system, not just JMS through the JCA. EJB 3.0 does not really expand on the feature set of earlier specification versions, but it does simplify configuration with the use of annotations. This chapter examines both JMS-based message-driven beans as well as the expanded message-driven bean model available to EJB 3.0 developers.
13. Timer Service - The Timer Service is a facility of the EJB container system that provides a timed-event API, which can be used to schedule timers for specified dates, periods, and intervals. A timer is associated with the enterprise bean that set it. The rest of this chapter describes the EJB Timer Service API and its use with stateless session and message-driven beans, as well as providing some criticism of and suggested improvements for the Timer Service.
14. The JNDI ENC and Injection - Every EJB container that is deployed in an application server has its own personal internal registry called the Enterprise Naming Context (ENC). This ENC is implemented by JNDI and is a sandbox where the EJB container can hold specific references to its environment. Think of it as the EJB container's personal address book, where it writes down addresses to various Java EE services that it wants to look up and use within its business logic. This chapter shows how you can populate the ENC and use it as your own JNDI registry, and also how to use it to inject environment references into bean fields.
15. Interceptors - Interceptors are objects that are able to interpose themselves on method calls or the life cycle events of session and message-driven beans. They allow you to encapsulate common behavior that cuts across large parts of your application. This behavior is usually in common code that you don't want in your business logic. Where most of the changes to the EJB 3.0 specification were designed to make EJB easier to use for application developers, interceptors are an advanced feature that provide you another way to modularize your application or even extend your EJB container. This chapter shows how to write an interceptor and shows various real-world examples of where interceptors can be used.
16. Transactions - In business software, a transaction embodies the concept of a commercial exchange. This chapter provides an in-depth explanation of transactions and describes the transactional model defined by EJB.
17. Security - Although a small programmatic API is available for interacting with Java EE security services, users rarely have to write any code to secure their applications because setting up security is usually a static declarative process. Only session beans can be secured in the world of EJB. Java Persistence does not yet have a mechanism to secure access, but it is possible--depending on the RDBMS system you are using--to assign privileges at the database level. This chapter focuses on how to set up authentication and authorization for your session beans.
18. EJB 3.0: Web Services Standards -Explains the XML, SOAP, WSLD, and UDDI web services standards.
19. EJB 3.0 and Web Services - Discusses how the JAX-RPC API supports web services in EJB.
20. Java EE - Provides an overview of Java EE 5 and explains how EJB 3.0 fits into this new platform.
21. EJB Design in the Real World - Provides some basic design strategies that can simplify your EJB development efforts and make your EJB system more efficient.
The rest of the book, chapters 22 through 37, consist of an applied workbook for the first part of the book. Chapters 22 and 23 discuss the installation of JBOSS, an open source Java EE application server. Chapters 24 through 37 consist of exercises that cover the material in chapters 4 through 19. This workbook is based on the production release of JBoss 4.0.4 and many of the EJB 3.0 examples from Enterprise JavaBeans 3.0, Fifth Edition. All of the examples will work properly with JBoss 4.0.4 and above, but not with earlier versions of JBoss.
This is truly a very densely packed but informative book. A good companion to it is "JBOSS At Work" which is pretty good at explaining Enterprise Java. I highly recommend this book to the Java professional who is already familiar with developing business solutions.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
5 of 5 people found the following review helpful:
4.0 out of 5 stars
Everything EJB, August 29, 2008
This review is from: Enterprise JavaBeans 3.0 (5th Edition) (Paperback)
This book covers almost everything related to EJBs in their new reincarnation. Its author have rightfully chosen to scrap any information concerning EJB 2.1. This is the right path to take as the new 3.X standard is so radically different (read much more useful) from the earlier versions.
The book starts out with a fairly detailed introduction to JPA 1.0 persistence mappings, entity relations and inheritance. It then moves on to covering session beans, interceptors, JAX-WS/RPC, the JNDI ENC and JTA.
This is a massive amount of stuff and still the author manages to convey its primary use, pitfalls and corner cases in an engaging technical style. So from a topical point of view you get what you pay for (and then some). The book is however not without some problems. First of all it contains some annoying errors, like:
1) In the interceptor chapter, the author fails to inform you that EJB interceptors are only used on direct invocations. That is if you put a interceptor on EJB A and inject it into EJB B, then delegated method invocations on EJB A from B are not intercepted. This is annoying at best, and at worst it could be considered an enormous flaw in the EJB spec.
2) Some JPA information is just plain wrong (like the use of named parameters in native queries). Most of these errors can be traced back to the fact that the author uses Hibernate which indeed supports this non-standard functionality. While understandable, it does confuse you some when confronted with strange errors in other containers
Many other errors exists and this book badly needs a review from some of the other EJB/JPA spec members, preferably someone not involved with the JBoss container. Another and more grave problem is the fact that the book presents most technologies as separate entities, and thereby you fail to see the complete picture. I really miss a complete real life EJB applications including:
1) Security (propagation of client role to the server (i.e. getCallerPrincipal)).
2) Interceptors (for logging and security).
3) Use of EJBs from a web application.
4) Testing of EJBs (best practices for easy unit testing).
5) Packaging and compiling (these days you cannot write a JEE book without a complete Maven sample)
This might sound like allot of grief, but I still choose to give the book four stars from the simple fact that it is complete, contains allot of useful samples (like the .NET SOAP application client) and manages to make many hard topics easy to understand.
In general a well written and useful book with a heap of information, written in a pragmatic style without to much fluff.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No