J2EE Applications and BEA WebLogic Server

From the Book: Introducing BEA WebLogic Application Servers J2EE Applications and BEA WebLogic Server addresses the need for a practical, state-of-the art book on developing enterprise applications with the market-leading BEA WebLogic Java application servers. The BEA WebLogic family of application servers includes BEA WebLogic Server, BEA WebLogic Enterprise, BEA WebLogic Commerce Server, and BEA WebLogic Personalization Server. This book focuses on BEA WebLogic Server. BEA WebLogic Server (WebLogic Server) is a widely used Java application server for constructing multi-tier, secure, large-scale, distributed Web applications for e-commerce and other high-volume applications. Distributed applications require sophisticated, fast, fault-tolerant networked communication among application tiers and components. In a client-server application, client programs send requests and receive responses from a server system. With the advent of middleware and the Web revolution, many enterprise sites have moved from client-server application environments to n-tier—usually, 3- or 4-tier—architectures. In multi-level architectures, efficient network connectivity is paramount. In a multi-tier application, WebLogic Server provides the framework for developing and deploying server-side business logic, and supports a distributed programming model that hides the complexity of distributed programming from the application writer. The programming model provided by J2EE and the WebLogic Server extensions provides some level of transparency, so that writing a distributed application is similar to writing a local application. Although the programmer must still be concerned about error handling and efficiency, WebLogic Server's implementation of the J2EE services provides an excellent development and execution environment for an enterprise-level distributed application. An application server such as BEA WebLogic Server handles server-side business logic and the administration of a multi-client, distributed application that uses a variety of clients and servers. Giving the responsibility for business logic and traffic control to an application server has the following benefits: Efficiency: Web browser and application clients can share the same business logic, rather than having to deploy business rules with each instance of a client. Performance: Locating server-side business logic with or near resource-intensive modules such as data stores can improve performance. Manageability: System administration and security issues are easier to address when business logic is centralized in an application server. History of BEA's WebLogic Server Division WebLogic, Inc. was founded in 1995--when Java, still a "think tank" project of Sun Microsystems, was code-named "Oak." In 1998, WebLogic merged with BEA Systems, Inc., a major vendor of transaction monitors and other tools for creating and managing enterprise-scale distributed systems. The BEA WebLogic Server product is a part of the BEA E-Business Platform. From the beginning, the WebLogic Server developers determined to use only Java, and to focus on server-side technologies: server support and middleware management of multi-tier applications. Using off-the-shelf Java development tools (and general-purpose text-editing tools such as emacs), the WebLogic Server developers implemented APIs for each new Java standard feature that Sun specified. As a result, WebLogic Server has not only kept current with Java standards development but has also had the capability to influence emerging Java standards. BEA WebLogic Server was an early implementer of each emerging Java Enterprise standard, including Enterprise JavaBeans (EJB), Remote Method Invocation (RMI), servlets, the Java Naming and Directory Interface (JNDI), and Java Database Connectivity (JDBC) for Oracle, Informix, Sybase, and Microsoft SQL Server. Each of these technologies is explained and illustrated in the chapters that follow. In July 2000, the BEA Systems family of application servers successfully completed Sun Microsystems Java 2 Enterprise Edition (J2EE) certification, becoming the first independent company to achieve official J2EE certification. BEA WebLogic Server has won several industry awards, including: Best Java Application Server (JavaPro, June 2000) Product Excellence and Productivity Award (Software Development Magazine, March 2000) Java World Reader's Choice Award for best e-commerce application server, 1999 Infoworld's Product of the Year, 1999 Java Developers Journal Editor's Choice Award in 1998 and 1999 Why We Wrote This Book BEA WebLogic Server has a growing installed base that has been supported by training classes and extensive documentation, but there has been no comprehensive, practical coverage of full-scale application development on the WebLogic Server platform. This step-by-step book explains where to start, and how to put all the pieces together. Planning for deployment and selecting the technologies that you'll use for each tier of the application is as important as laying down code.Target Audience J2EE Applications and BEA WebLogic Server is targeted at intermediate to professional-level Java programmers developing applications for the BEA WebLogic Server platform, the market leader among application servers. This book focuses on best practices for developing enterprise applications using the WebLogic Server APIs. The WebAuction application, a complete sample e-commerce application, is explained and developed as an example in Chapter 14. An accompanying CD-ROM includes all software and code needed to implement the sample application in your own environment. After reading this book, Java developers will possess the skills and knowledge required to develop scalable and robust applications on the WebLogic platform. This book is targeted at programmers who know basic Java on at least an intermediate level and would like to learn WebLogic Server. We assume that readers know about standard Java programming concepts such as exceptions and threads. However, we do not assume that readers know much about J2EE or application servers. Brief Overview of the Book J2EE Applications and BEA WebLogic Server contains both a descriptive narrative and examples for each major J2EE API, and a sample application that concludes the book. Using a step-by-step approach, the book introduces each major J2EE API and uses it to build a component of the WebAuction application, which supports an online auction site. Building the WebAuction application gives users the opportunity to explore significant areas of building a distributed Enterprise Java application, including: Overview of J2EE technologies (Chapter 2) Building presentation logic with servlets or Java Server Pages (JSPs); (Chapters 3 and 4) Establishing database connectivity and using transactions (Chapter 5) Using Remote Method Invocation, and the Naming and Directory Interface (Chapter 6) Using a message-oriented middleware layer to coordinate all the components and operations in your multi-tier, distributed WebAuction application (Chapter 7) Creating Enterprise Java Beans (Chapters 8-10) Integrating Internet mail (Chapter 11) Adding security (Chapter 12) Designing a distributed deployment (Chapter 13) Building and deploying the completed application (Chapter 14) Performing a capacity-planning exercise to assess the performance of the deployed application (Chapter 15) Chapter 1 presents a detailed overview of the book, with a roadmap and chapter summaries. Chapter 1 also lists system requirements and conventions. Chapter 2 surveys the J2EE technologies that are described in depth, with examples, in Chapters 3-12.About the Authors Michael Girdley is the Senior Product Manager for the BEA WebLogic Server, a role in which he acts as marketing liaison to over 200 engineers. An experienced application developer in Java, HTML, C, and C++, Michael is a co-author of Web Programming with Java (Sams-net Publishing, 1996) and Java Unleashed, Second Edition (Sams-net Publishing, 1997). Michael holds a bachelor's degree in computer science with honors from Lafayette College. Rob Woollen is a Senior Software Engineer at BEA Systems. He is currently the lead developer for the WebLogic Server EJB Container. Before joining BEA, Rob worked on UNIX kernel networking for Hewlett-Packard. Rob holds a bachelor's degree in computer science from Princeton University. Sandra L. Emerson is a technical writer and consultant with 20 years' experience in the software industry. She is a co-author of four computer trade books: The Business Guide to the UNIX System (Addison-Wesley); Database for the IBM PC (Addison-Wesley); Troff Typesetting for UNIX Systems (Prentice Hall PTR); and The Practical SQL Handbook (Addison-Wesley, Fourth Edition, 2001).