The J2EE™ Tutorial
Addison Wesley
978-0-201-79168-6 (ISBN)
- Titel erscheint in neuer Auflage
- Artikel merken
Following in the footsteps of the The Java Tutorial -- a global best-seller -- The J2EE Tutorial offers an indispensable, example-centered resource for every developer who wants to master enterprise development with Java 2 Enterprise Edition, Version 1.3. The authors -- all of them Sun senior writers with direct access to the architects of the J2EE platform -- offer concise, hands-on introductions to each key J2EE technology. They offer practical techniques and examples for working with Enterprise JavaBeans, servlets, JavaServer Pages, Java Message Service (JMS), Java Naming and Directory Interface (JNDI), XML, the J2EE Connector Architecture, JavaMail, and JDBC. The book has been refined to reflect thousands of comments from developers utilizing draft editions published on the Web. All contents and examples are also provided on the accompanying CD-ROM, along with complete copies of the J2EE and J2SE Version 1.3 platform. For every experienced Java programmer who wants to build enterprise solutions with Java 2 Enterprise Edition Version 1.3.
Stephanie Bodoff is a staff writer at Sun Microsystems. In previous positions she worked as a software engineer on distributed computing and telecommunications systems and object-oriented software development methods. Since her conversion to technical writing, Stephanie has documented object-oriented databases, application servers, and enterprise application development methods. Dale Green is a staff writer with Sun Microsystems, where he documents the J2EE platform. In previous positions he programmed business applications, designed databases, taught technical classes, and documented RDBMS products. In his current position he writes about Enterprise JavaBeans technology and the J2EE SDK. Kim Haase is a staff writer with Sun Microsystems, where she documents the J2EE platform. In previous positions she has documented compilers, debuggers, and floating-point programming. She currently writes about the Java Message Service and J2EE SDK tools. Eric Jendrock is a staff writer with Sun Microsystems, where he documents the J2EE platform. Previously, he documented middleware products and standards. Currently, he writes about the J2EE Compatibility Test Suite and J2EE security. Monica Pawlan is a staff writer for the Java Developer Connection (JDC), and was a contributing author for The Java™ Tutorial. She has a background in 2D and 3D graphics, security, and database products, and loves to study and write about emerging technologies. When not writing, she spends her spare time gardening, studying classical piano, and dreaming of far away places—some of which she occasionally visits. Beth Stearns is the principal partner of ComputerEase Publishing, a computer consulting firm she founded in 1982. Among her publications are Java Native Interface in The Java Tutorial Continued (Addison-Wesley), “The EJB Programming Guide” for Inprise Corporation, and “ Understanding EDT, ” a guide to Digital Equipment Corporation's text editor.
Foreword. Preface. 1. Overview. Distributed Multitiered Applications. J2EE Components. J2EE Clients. Web Components. Business Components. Enterprise Information System Tier. J2EE Containers. Container Services. Container Types. Packaging. Development Roles. J2EE Product Provider. Tool Provider. Application Component Provider. Application Assembler. Application Deployer and Administrator. Reference Implementation Software. Database Access. J2EE APIs. Simplified Systems Integration. Tools. 2. Getting Started. Setting Up. Getting the Example Code. Getting the Build Tool (ant). Checking the Environment Variables. Starting the J2EE Server. Starting the deploytool. Creating the J2EE Application. Creating the Enterprise Bean. Coding the Enterprise Bean. Compiling the Source Files. Packaging the Enterprise Bean. Creating the J2EE Application Client. Coding the J2EE Application Client. Compiling the Application Client. Packaging the J2EE Application Client. Specifying the Application Client's Enterprise Bean Reference. Creating the Web Client. Coding the Web Client. Compiling the Web Client. Packaging the Web Client. Specifying the Web Client's Enterprise Bean Reference. Specifying the JNDI Names. Deploying the J2EE Application. Running the J2EE Application Client. Running the Web Client. Modifying the J2EE Application. Modifying a Class File. Adding a File. Modifying the Web Client. Modifying a Deployment Setting. Common Problems and Their Solutions. Cannot Start the J2EE Server. Compilation Errors. Deployment Errors. J2EE Application Client Runtime Errors. Web Client Runtime Errors. Detecting Problems With the Verifier Tool. Comparing Your EAR Files with Ours. When All Else Fails. 3. Enterprise Beans. What Is an Enterprise Bean? Benefits of Enterprise Beans. When to Use Enterprise Beans. Types of Enterprise Beans. What Is a Session Bean? State Management Modes. When to Use Session Beans. What Is an Entity Bean? What Makes Entity Beans Different from Session Beans? Container-Managed Persistence. When to Use Entity Beans. What Is a Message-Driven Bean? What Makes Message-Driven Beans Different from Session and Entity Beans? When to Use Message-Driven Beans. Defining Client Access with Interfaces. Remote Access. Local Access. Local Interfaces and Container-Managed Relationships. Deciding on Remote or Local Access. Performance and Access. Method Parameters and Access. The Contents of an Enterprise Bean. Naming Conventions for Enterprise Beans. The Life Cycles of Enterprise Beans. The Life Cycle of a Stateful Session Bean. The Life Cycle of a Stateless Session Bean. The Life Cycle of an Entity Bean. The Life Cycle of a Message-Driven Bean. 4. A Session Bean Example. The CartEJB Example. Session Bean Class. Home Interface. Remote Interface. Helper Classes. Running the CartEJB Example. Other Enterprise Bean Features. Accessing Environment Entries. Comparing Enterprise Beans. Passing an Enterprise Bean's Object Reference. 5. Bean-Managed Persistence Examples. The SavingsAccountEJB Example. Entity Bean Class. Home Interface. Remote Interface. Running the SavingsAccountEJB Example. deploytool Tips for Entity Beans with Bean-Managed Persistence. Mapping Table Relationships for Bean-Managed Persistence. One-to-One Relationships. One-to-Many Relationships. Many-to-Many Relationships. Primary Keys for Bean-Managed Persistence. The Primary Key Class. Primary Keys in the Entity Bean Class. Getting the Primary Key. Handling Exceptions. 6. Container-Managed Persistence Examples. Overview of the RosterApp Application. The PlayerEJB Code. Entity Bean Class. Local Home Interface. Local Interface. A Guided Tour of the RosterApp Settings. RosterApp. RosterClient. RosterJAR. TeamJAR. Method Invocations in RosterApp. Creating a Player. Adding a Player to a Team. Removing a Player. Dropping a Player from a Team. Getting the Players of a Team. Getting a Copy of a Team's Players. Finding the Players by Position. Getting the Sports of a Player. Running the RosterApp Example. Setting Up. Deploying the Application. Running the Client. deploytool Tips for Entity Beans with Container-Managed Persistence. Specifying the Bean's Type. Selecting the Persistent Fields and Abstract Schema Name. Defining EJB QL Queries for Finder and Select Methods. Generating SQL and Specifying Table Creation. Specifying the Database JNDI Name, User Name, and Password. Defining Relationships. Primary Keys for Container-Managed Persistence. The Primary Key Class. Primary Keys in the Entity Bean Class. Generating Primary Key Values. 7. A Message-Driven Bean Example. Example Application Overview. The J2EE Application Client. The Message-Driven Bean Class. The onMessage Method. The ejbCreate and ejbRemove Methods. Running the SimpleMessageEJB Example. Starting the J2EE Server. Creating the Queue. Deploying the Application. Running the Client. deploytool Tips for Message-Driven Beans. Specifying the Bean's Type and Transaction Management. Setting the Message-Driven Bean's Characteristics. deploytool Tips for JMS Clients. Setting the Resource References. Setting the Resource Environment References. Specifying the JNDI Names. 8. Enterprise JavaBeans Query Language. Terminology. Simplified Syntax. Example Queries. Simple Finder Queries. Finder Queries That Navigate to Related Beans. Finder Queries with Other Conditional Expressions. Select Queries. Full Syntax. BNF Symbols. BNF Grammar of EJB QL. FROM Clause. Path Expressions. WHERE Clause. SELECT Clause. EJB QL Restrictions. 9. Web Clients and Components. Web Client Life Cycle. Web Application Archives. Creating a WAR File. Adding a WAR File to an EAR File. Adding a Web Component to a WAR File. Configuring Web Clients. Application-Level Configuration. WAR-Level Configuration. Component-Level Configuration. Deploying Web Clients. Running Web Clients. Updating Web Clients. Internationalizing Web Clients. 10. Java Servlet Technology. What Is a Servlet? The Example Servlets. Troubleshooting. Servlet Life Cycle. Handling Servlet Life-Cycle Events. Handling Errors. Sharing Information. Using Scope Objects. Controlling Concurrent Access to Shared Resources. Accessing Databases. Initializing a Servlet. Writing Service Methods. Getting Information from Requests. Constructing Responses. Filtering Requests and Responses. Programming Filters. Programming Customized Requests and Responses. Specifying Filter Mappings. Invoking Other Web Resources. Including Other Resources in the Response. Transferring Control to Another Web Component. Accessing the Web Context. Maintaining Client State. Accessing a Session. Associating Attributes with a Session. Session Management. Session Tracking. Finalizing a Servlet. Tracking Service Requests. Notifying Methods to Shut Down. Creating Polite Long-Running Methods. 11. JavaServer Pages Technology. What Is a JSP Page? The Example JSP Pages. The Life Cycle of a JSP Page. Translation and Compilation . Execution. Initializing and Finalizing a JSP Page. Creating Static Content. Creating Dynamic Content. Using Objects within JSP Pages. JSP Scripting Elements. Including Content in a JSP Page. Transferring Control to Another Web Component. Param Element. Including an Applet. Extending the JSP Language. 12. JavaBeans Components in JSP Pages. JavaBeans Component Design Conventions. Why Use a JavaBeans Component? Creating and Using a JavaBeans Component. Setting JavaBeans Component Properties. Retrieving JavaBeans Component Properties. 13. Custom Tags in JSP Pages. What Is a Custom Tag? The Example JSP Pages. Using Tags. Declaring Tag Libraries. Types of Tags. Defining Tags. Tag Handlers. Tag Library Descriptors. Simple Tags. Tags with Attributes. Tags With Bodies. Tags That Define Scripting Variables. Cooperating Tags. Examples. An Iteration Tag. A Template Tag Library. How Is a Tag Handler Invoked? 14. Transactions. What Is a Transaction? Container-Managed Transactions. Transaction Attributes. Rolling Back a Container-Managed Transaction. Synchronizing a Session Bean's Instance Variables. Methods Not Allowed in Container-Managed Transactions. Bean-Managed Transactions. JDBC Transactions. JTA Transactions. Returning without Committing. Methods Not Allowed in Bean-Managed Transactions. Summary of Transaction Options for Enterprise Beans. Transaction Timeouts. Isolation Levels. Updating Multiple Databases. Transactions in Web Components. 15. Security. Overview. Security Roles. Declaring and Linking Role References. Mapping Roles to J2EE Users and Groups. Web-Tier Security. Protecting Web Resources. Controlling Access to Web Resources. Authenticating Users of Web Resources. Using Programmatic Security in the Web Tier. Unprotected Web Resources. EJB-Tier Security. Declaring Method Permissions. Using Programmatic Security in the EJB Tier. Unprotected EJB-Tier Resources. Application Client-Tier Security. Specifying the Application Client's Callback Handler. EIS-Tier Security. Configuring Sign-On. Container-Managed Sign-On. Component-Managed Sign-On. Configuring Resource Adapter Security. Propagating Security Identity. Configuring a Component's Propagated Security Identity. Configuring Client Authentication. J2EE Users, Realms, and Groups. Managing J2EE Users and Groups. Setting Up a Server Certificate. 16. Resource Connections. JNDI Names and Resource References. deploytool Tips for Resource References. Database Connections for Enterprise Beans. Coded Connections. Connection Pooling. Mail Session Connections. Running the ConfirmerEJB Example. URL Connections. Running the HTMLReaderEJB Example. 17. J2EE Connector Architecture. About Resource Adapters. Resource Adapter Contracts. Administering Resource Adapters. The Black Box Resource Adapters. Transaction Levels. Properties. Configuring JDBC Drivers. Resource Adapter Tutorial. Setting Up. Deploying the Resource Adapter. Testing the Resource Adapter. Common Client Interface. Overview of the CCI. Programming with the CCI. Writing a CCI Client. CCI Tutorial. 18. The Duke's Bank Application. Enterprise Beans. Session Beans. Entity Beans. Helper Classes. Database Tables. Protecting the Enterprise Beans. Application Client. The Classes and Their Relationships. BankAdmin Class. EventHandle Class. DataModel Class. Web Client. Design Strategies. Web Client Life Cycle. Protecting the Web Resources. Internationalization. Building, Packaging, Deploying, and Running the Application. Adding Groups and Users to the Realm. Starting the J2EE Server, deploytool, and Database. Compiling the Enterprise Beans. Packaging the Enterprise Beans. Compiling the Web Client. Packaging the Web Client. Compiling the J2EE Application Client. Packaging the J2EE Application Client. Packaging the Enterprise Archive File. Opening the Enterprise Archive File. Reviewing JNDI Names. Mapping the Security Roles to Groups. Deploying the Duke's Bank Application. Creating the Bank Database. Running the J2EE Application Client. Running the Web Client. Appendix A: HTTP Overview. HTTP Requests. HTTP Responses. Appendix B: J2EE SDK Tools. J2EE Administration Tool. Cleanup Tool. Cloudscape Server. Starting Cloudscape. Stopping Cloudscape. Running the Interactive SQL Tool. Cloudscape Server Configuration. Deployment Tool. J2EE Server. Key Tool. Packager Tool. EJB JAR File. Web Application WAR File. Application Client JAR File. J2EE Application EAR File. Specifying the Runtime Deployment Descriptor. Resource Adapter RAR File. Realm Tool. Examples. runclient Script. Syntax. Example. Accessing a Remote Server. Preventing the User Name and Password Prompts 443Verifier Tool. Command-Line Verifier. Stand-Alone GUI Verifier. Appendix C: Examples. Glossary. About the Authors. Index. 0201791684T03292002
Erscheint lt. Verlag | 5.4.2002 |
---|---|
Verlagsort | Boston |
Sprache | englisch |
Maße | 187 x 233 mm |
Gewicht | 797 g |
Themenwelt | Mathematik / Informatik ► Informatik ► Netzwerke |
Mathematik / Informatik ► Informatik ► Web / Internet | |
ISBN-10 | 0-201-79168-4 / 0201791684 |
ISBN-13 | 978-0-201-79168-6 / 9780201791686 |
Zustand | Neuware |
Haben Sie eine Frage zum Produkt? |