Author: (USA) Alur (Alur/Deepak.) et al. / Liu Tianbei et al.
Publisher:
Publish Date: 2005-03-01
Features: "The Java landscape is littered with various libraries, tools, and technology specifications. What is lacking is the professional ability to integrate these elements and solve real-world problems. The patterns in this book serve as smart cement in the construction of J2EE software—the intelligent mortar that binds everything together.—John Vlissides, one of the authors of "Design Patterns" "The authors of "J2EE Core Patterns" have extracted a set of truly practical patterns. They introduce how to apply these patterns and how to refactor your system to benefit from them. It's like having an expert group sitting next to you.—Grady Booch, Chief Scientist at Rational Software "The authors introduce numerous patterns that are extremely helpful for application architecture. This is an outstanding work. Just the 'Refactoring' section alone is worth the entire book!"—Craig McClanahan, Chief Architect of Struts, and Lead Architect of the JavaServer Faces specification "Developers often conflate 'learning a technology' with 'learning to design with that technology.' In this book, senior architects from Sun Java Center share their years of experience in designing with J2EE technologies. The main focus of this book is on using J2EE core technologies—including JSPTM, Servlet, EJBTM, JMSTMAPI, and others—to implement patterns, best practices, design strategies, and proven solutions in enterprise applications. The J2EE Patterns Catalog includes 21 patterns and a wealth of strategies to help document and promote the best practices of using these technologies.
Preface Since the first edition of this book was published, we have received a great deal of feedback on the initial 15 patterns. In recent years, the J2EE Patterns Community Catalog Server (JPCLS) has been very active and successful, with many insightful discussions taking place every day. During this time, we have also worked on several important large-scale J2EE architecture design and development projects with our clients. Incorporating the experience and feedback from this period into the revision of existing patterns and the documentation of new patterns has indeed been a laborious and challenging process. We have paid special attention to the most frequently mentioned feedback: support for J2EE technology specifications and the new version of Web Services. We have completely revised and updated the initial 15 patterns to cover the J2EE 1.4 specification. We have added many new strategies to these initial patterns. Additionally, we have documented 6 new patterns to improve the pattern language and provide better conceptual abstraction for building, understanding, and using J2EE frameworks. While each of these patterns is highly practical on its own, we also believe that their true power is unleashed when combined to solve large-scale problems. Therefore, in this new edition, we introduce a new area we are exploring, which we call "Microarchitecture."
Microarchitecture refers to the building blocks for constructing applications and systems. Compared to the individual patterns listed in the catalog, this concept represents a higher-level abstraction and often manifests as a set of interrelated patterns that address common recurring problems in application architecture. We are pleased to use "Microarchitecture" to describe a network of interrelated patterns that form a ready-made solution for addressing larger-scale problems, such as subsystem design. This edition includes a microarchitecture called WebWorker, which addresses the problem of how a J2EE application can integrate with a workflow system. It specifically discusses the use of system integration patterns to enable users in a workflow system to interact with the J2EE application.
This book covers the patterns for the Java 2 Enterprise Edition (J2EE) platform. The J2EE patterns documented in this new edition of the book can be used to solve the design challenges that developers often encounter when building applications on the J2EE platform. The patterns recorded in this catalog were discovered in real-world design scenarios, and it is because of their use that we have been able to create successful J2EE applications for our clients. This book describes many solutions that have been proven to work on the J2EE platform, with a particular emphasis on the following core J2EE technologies: JavaServer Pages (JSP), servlets, Enterprise JavaBeans (EJB) components, Java Message Service (JMS), JDBC, and Java Naming and Directory Interface (JNDI). For recurring problems in the J2EE platform, we provide solutions through the J2EE Patterns Catalog and J2EE Refactoring. These solutions can be applied when developing new systems or improving the design of existing systems. The patterns recorded in this book will help you quickly become proficient in J2EE technologies, enabling you to build robust and efficient enterprise applications.
As always, many of us continue to naively believe that learning a technology is equivalent to learning to design with it. While understanding the technology is indeed a crucial element in successful design, many Java books provide excellent explanations of technical details (e.g., specific API usages), but they often lack a deeper exploration of how to apply the technology. To learn design, practical design experience is essential, as is sharing knowledge about best and worst practices with other developers. The experience conveyed in this book comes from our real-world work. We are part of Sun's Sun Java Center (SJC) consulting division. In our work, we often encounter situations where the rapid pace of technological advancement leaves designers and developers still struggling to understand the technology itself, with little time to learn how to design with it. Simply telling designers and developers how to write high-quality code or suggesting they use servlets and JSP for the presentation layer and EJB components for the business layer is not enough. So, how can a dedicated J2EE architect not only learn "what to do" but also "what not to do"? What constitutes best practices? What are the worst practices? How do you go from problem to design to implementation?
Sun Java Center and the J2EE Patterns Catalog Since its inception, Sun Java Center's architects have collaborated with clients worldwide to successfully design, plan, build, and deploy various types of Java and J2EE-based systems. Sun Java Center is a rapidly growing consulting division that continues to recruit new employees to join its team of experienced architects. Currently, there are numerous proven designs and architectures that have been solidified and shared with others—a critical need in our industry. We recognized this need early on and began documenting our J2EE platform experience in the form of patterns as early as 1999. Although we reviewed existing literature, we couldn't find any pattern catalog specifically dedicated to J2EE platforms. Many books discuss one or more aspects of J2EE technology, providing excellent introductions to the technology and dissecting the nuances of the specifications. Some of these books also offer design considerations, which we found particularly valuable. At the JavaOne conference in June 2000, we publicly presented our ideas on J2EE patterns for the first time. Since then, we have received a great deal of enthusiastic feedback from architects and developers. Some expressed a strong willingness to learn more about patterns, while others admitted they had used these patterns but had not named or documented them. The interest in J2EE patterns encouraged us to continue our work. Therefore, we compiled the J2EE Patterns Catalog, which was first released to the J2EE community via the Java Developer Connection (JDC) in March 2001 as a beta version. Based on extensive community feedback, that beta version eventually evolved into the book you see today. We hope that these J2EE patterns, best practices, strategies, worst practices, and refactoring will benefit everyone.
Scope of Discussion This book covers the following topics:
- Using patterns in the J2EE platform. Based on our experience in the J2EE platform, we have compiled the patterns catalog in this book. This catalog describes the best practices for and designing applications on the J2EE platform. The book focuses on the following J2EE technologies: servlets, JSP, EJB components, and JMS.
- Designing applications that use servlets, JSP, EJB components, and JMS technologies. Learning the technology itself and its APIs is not enough; it is equally important to learn how to design with the technology. We have documented the best practices for using these technologies in our experience.
- Avoiding "reinventing the wheel" in J2EE platform design and architecture. Patterns encourage design reuse. Reusing existing solutions can shorten the application development cycle—this includes J2EE applications.
- Identifying poor practices in existing systems and using J2EE patterns to refactor these designs into better solutions. Knowing what works is good, but knowing what doesn't work is equally important. We have documented some of the poor practices we encountered while designing J2EE applications.
This book does not cover the following topics:
- How to program using Java or J2EE technologies. This book is not about programming. Although much of the content is based on J2EE technologies, we do not describe API details. If you want to learn Java programming or how to use any technology in J2EE, there are many excellent books and numerous online resources available as tutorials. If you want to learn a specific technology, we strongly recommend the various online tutorials available on the Java official website (http://java.sun.com). The official J2EE technology specifications are also available on the Java homepage.
- Which development process and methodology to adopt. We do not specifically recommend any particular development process or methodology, as the content of this book is not closely related to either. Therefore, this book does not teach any process or methodology that can be used for project development. If you want to learn about processes and methodologies, there are many books available that discuss various object-oriented methodologies, and several new books address lightweight processes like Extreme Programming.
- How to use the Unified Modeling Language (UML). This book does not teach you how to use UML. We extensively use UML (particularly class diagrams and sequence diagrams) to document patterns and describe static and dynamic interaction relationships. If you want to learn UML, refer to Grady Booch, Ivar Jacobson, and James Rumbaugh's "UML User Guide" [Booch] and "UML Reference Manual" [Rumbaugh].
Who Should Read This Book This book is for everyone passionate about J2EE—programmers, architects, developers, and technical managers. In short, anyone interested in designing, architecting, or developing applications on the J2EE platform. We aim to make this book a training guide for J2EE architects and designers. We believe that good design and well-architected projects are of great importance, and we need excellent architects to achieve this level. For development teams with varying skill levels, if we thoroughly document patterns, best practices, and worst practices to facilitate knowledge sharing and dissemination within the team, it could be invaluable. We also hope this book partially meets similar needs.
Organization of the Book This book is organized into two parts.
Part I: "Patterns and J2EE" is an introduction to J2EE and patterns. It examines design considerations for developing JSP, servlets, and EJB. This part also includes J2EE platform poor practices and refactoring. Chapter 1, "Introduction," briefly discusses multiple topics, including patterns, the J2EE platform, the definition of patterns, and the categorization of patterns. It then introduces the J2EE Patterns Catalog. Chapter 2, "Presentation Layer Design Considerations and Poor Practices," and Chapter 3, "Business/Integration Layer Design Considerations and Poor Practices," discuss the design considerations and poor practices for the presentation layer and the business/ integration layer, respectively. The design considerations here refer to the issues that a J2EE developer/ designer/ architect needs to consider when working on the J2EE platform. When reading the topics in these chapters, you can refer to other resources (such as official specifications and excellent related books) for detailed information on related topics. Chapter 4, "J2EE Refactoring," examines several refactorings that we encountered in our actual work, which also helped us improve designs that were initially less ideal. These refactorings provide an alternative perspective on the other content of the book, which we believe is a valuable supplement to the patterns catalog. This chapter reflects the influence of Martin Fowler and his book "Refactoring" [Fowler]. For readers familiar with "Refactoring," the format of this chapter should also be quite familiar. However, the content of this chapter is entirely based on J2EE technologies, while Martin Fowler examines refactoring at a different level in his works.
Part II: "J2EE Patterns Catalog" lists the J2EE Patterns Catalog. The patterns included in the catalog form the core of this book. Chapter 5, "Overview of J2EE Patterns," provides a summary of the J2EE Patterns Catalog. This chapter explains how to use J2EE core technologies to implement patterns, best practices, design strategies, and proven solutions in enterprise applications, covering technologies such as JSP, servlets, EJB, and JMS. The J2EE Patterns Catalog includes 21 patterns and a wealth of strategies to help readers quickly become proficient in J2EE technologies and build robust and efficient enterprise applications. This book is a reference for computer application developers, architects, technical managers, and others.
Core J2EE Patterns (2nd Edition)
📌 Related Posts
Literature
Automotive Electrical Self-Study Book (Revised Edition)
2026-09-15
Literature
Reference consultation new theory
2026-09-25
Literature
International law
2026-09-24
Literature
Digestive Disorders Diagnosis and Treatment Handbook
2026-09-21
Literature
Science and Art of C Language
2026-09-26
Literature
Ventilation Fan Practical Technology Manual
2026-09-26
Literature
CAXA CNC Milling CAD/CAM Technology
2026-09-26
Literature
Plastic Extrusion Molding Examples
2026-09-26