Top positive review
6 people found this helpful
on August 29, 2008
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.