Overview
- Includes more than 30 percent revised material and five new chapters, covering the new 2.1 features such as EJB Timer Service and JMS as well as the latest open source Java solutions
- The book was developed as part of TheServerSide.com online EJB community, ensuring a built-in audience
- Demonstrates how to build an EJB system, program with EJB, adopt best practices, and harness advanced EJB concepts and techniques, including transactions, persistence, clustering, integration, and performance optimization
- Offers practical guidance on when not to use EJB and how to use simpler, less costly open source technologies in place of or in conjunction with EJB
Synopsis
The bestselling classic is back-and covers the new EJB 2.1 specification!
Building on the overwhelming success of his previous two editions, renowned author Ed Roman has returned-along with Enterprise JavaBeans (EJB) gurus Gerald Brose and Rima Patel Sriganesh-to offer you the inside scoop on the EJB 2.1 specification and related enhancements in J2EETM 1.4. Continuing the tradition of providing you with an unparalleled EJB tutorial, this expert team of authors has revised more than 30 percent of the book and added new chapters that explore the dramatic changes in the way EJB is now used for building applications.
Serving as the ultimate resource that boasts the most up-to-date information on EJB, this edition begins with the fundamentals of building an EJB. You'll learn about advanced EJB concepts and best practices that you won't find anywhere else, such as transactions, persistence, clustering, integration, performance monitoring, security, and choosing an EJB Server. Along the way, you'll get in-depth coverage of:
- EJB security mechanisms
- Best practices for EJB application development, deployment, and testing
- Tips for selecting appropriate Web frameworks and EJB containers
- EJB integration with back-end enterprise information systems using J2EE connector technology
- Performance optimizations for various types of EJB
The companion Web site includes sample code, updates to the book, and links to useful software used in the book.
Editorials
From Barnes & Noble
The Barnes & Noble ReviewThe first edition of Ed Roman's Mastering Enterprise JavaBeans earned raves from programmers worldwide for its clarity and practical approach to EJB development -- not easy to do well, nor an easy topic to cover well. But many developers have delayed purchasing the book because they knew an extensive update was on the way. Delay no more: Mastering Enterprise JavaBeans, Second Edition has arrived, and it's all you hoped it would be. EJB 2.0 made practical
First and foremost, it's been thoroughly updated to cover Enterprise JavaBeans 2.0 specification (the previous edition, while discussing EJB 1.1, was primarily focused on EJB 1.0, and a lot's changed since then -- for one thing, the 2.0 spec is triple the size of 1.0!).
Second, the book reflects more than Roman's immense experience (he runs The Middleware Company, which specializes in server-side Java training and consulting). It also reflects the knowledge of two new co-authors -- Scott Ambler, himself a highly-respected Java and object technology author, and Tyler Jewell, one of the world's leading experts in BEA WebLogic Server. Plus, this time around, the book was beta tested on the Web, where it benefited from the comments and contributions of hundreds of developers worldwide.
A technical book for technical readers, Mastering Enterprise JavaBeans, Second Edition delves exceptionally deeply into the realities of EJB development: the dos, the don'ts, the counterintuitive elements -- and the occasional big surprises.
After an exceptionally clear overview of EJB, its rationale, and where it can fit into your enterprise application development strategy, Roman & Co. walk you through creating your first bean, outlining an eight-step approach you can use in most EJB development. Even here, the book alerts you to some significant subtleties. For example, EJB defines two types of exceptions: system-level and application-level. Each is handled very differently: the authors illuminate the differences and offer specific, detailed rules of thumb for when to use each.
The book's "first bean" chapter concludes with a quick design strategy -- including a warning to avoid the beginner's temptation of implementing a component interface with your bean, and a solution that preserves compile-time checks of your method signatures even without a component interface.
The authors systematically review the development details involved in implementing EJB applications. Through detailed code examples, you'll learn how to work with session, entity, and message-driven beans, and each of their subtypes -- including stateless and stateful session beans, bean-managed entity beans that draw upon database APIs such as JDBC, and container-managed persistent entity beans, wherein the EJB container handles storage for you. Each of these chapters contain detailed charts and diagrams that summarize key explanations and implementation guidelines.
Next, you'll learn how to extend your beans' functionality by calling beans from other beans, customizing beans through environment properties, accessing resource factories such as JDBC or JMS drivers, and using the new Java Authentication and Authorization Service (JAAS) API to enforce security.
The second half of the book focuses on advanced middleware concepts and techniques that can help you dramatically improve the performance and robustness of your Web and distributed applications. For instance, using EJB, you can gain the predictability and reliability of transactions without writing code directly to a transaction API. While this higher-level programming has compelling advantages, it's still fraught with confusion; the authors do a masterful job of clearing things up.
There's an invaluable chapter on persistence best practices -- including when to use entity beans and when not to; how to choose between container-managed and bean-managed persistence; and a six-page chart outlining the most common legacy data problems you'll encounter, and what you'll need to do about them. If that's not enough for you, the next chapter brings together expert high-level EJB design strategies (stateful vs. stateless, messaging vs. RMI-IIOP, local vs. remote interfaces, guaranteeing response times, tuning performance, partitioning, reuse, the right roles for XML, and more).
The book concludes with a complete primer on managing EJB projects -- including techniques for determining when EJB is overkill. (The Gartner Group says companies overspent by $1 billion on EJB projects in 2000, when servlets and JSP would've been plenty). Nuggets like those will make you thank your lucky stars you bought this book. (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 Jerseybased 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.