
Front cover Programming J2EE APIs with WebSphere Advanced Feel the power of the J2EE-compliant environment Learn J2EE APIs by practical application development Deploy J2EE applications to WebSphere Osamu Takagiwa Adrian Spender Anthony Stevens Julien Bouyssou ibm.com/redbooks International Technical Support Organization Programming J2EE APIs with WebSphere Advanced August 2001 SG24-6124-00 Take Note! Before using this information and the product it supports, be sure to read the general information in “Special notices” on page 331. First Edition (August 2001) This edition applies to VisualAge for Java Enterprise Version 3.5.3, and WebSphere Application Server Advanced Edition Version 3.5.3 for use with Windows NT/2000. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 2001. All rights reserved. Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Figures . .ix Tables . .xi Preface . xiii The team that wrote this redbook. xiii Special notice . xv IBM trademarks . xv Comments welcome. xv Part 1. Introduction. 1 Chapter 1. Our development conditions . 3 1.1 Development and deployment tools . 3 1.1.1 VisualAge for Java 4.0 . 4 1.2 WebSphere and J2EE . 4 Chapter 2. J2EE overview. 7 2.1 What is J2EE? . 8 2.2 Application components . 8 2.2.1 Application clients . 9 2.2.2 Applets . 10 2.2.3 Servlets and JavaServer Pages . 10 2.2.4 Enterprise JavaBeans . 10 2.3 Standard services . 11 2.3.1 HTTP and HTTPS . 11 2.3.2 Java Naming and Directory Interface (JNDI) . 12 2.3.3 Java DataBase Connectivity (JDBC) . 12 2.3.4 Java Message Service (JMS) . 12 2.3.5 JavaMail and JavaBeans Activation Framework (JAF). 13 2.3.6 Java Transaction API (JTA and JTS) . 13 2.3.7 Remote Method Invocation — Internet Inter-ORB protocol . 14 2.3.8 Java IDL . 14 2.3.9 XML deployment descriptors. 14 2.4 J2EE containers . 14 2.5 Resource managers and database . 16 2.6 Deployment . 17 2.6.1 Deployment and deployment descriptors . 17 2.6.2 The J2EE packages and their deployment descriptor. 17 © Copyright IBM Corp. 2001 iii Chapter 3. Products used within this book. 21 3.1 WebSphere software platform overview . 22 3.2 Foundation products. 23 3.2.1 WebSphere Application Server . 23 3.3 Product/J2EE API matching . 25 Chapter 4. Introducing PiggyBank. 27 4.1 Patterns for e-business overview . 28 4.1.1 User-to-Business. 28 4.1.2 User-to-Online Buying. 29 4.1.3 Business-to-Business . 29 4.1.4 User-to-Data . 29 4.1.5 User-to-User . 30 4.2 PiggyBank application scenario . 30 4.2.1 Review of application topology . 31 4.3 PiggyBank components . 33 4.3.1 Servlets . 33 4.3.2 JSPs . 35 4.3.3 EJB specifics. 35 4.3.4 MQSeries and JMS . 36 4.3.5 Database. 36 4.3.6 Setting up and using the PiggyBank scenario. 36 Part 2. The EJB container . 37 Chapter 5. Working with Enterprise JavaBeans . 39 5.1 EJB specification . 40 5.1.1 EJB container . 41 5.1.2 EJB composition . 43 5.1.3 PiggyBank scenario . 48 5.2 Session beans . 50 5.3 Entity beans . 56 5.3.1 Examining CMP . 58 5.3.2 Examining BMP. 62 5.3.3 Custom key class . 70 5.3.4 Bean finder helpers . 70 5.3.5 Entity context and session context . 73 5.3.6 Working with EJB metadata . 74 5.3.7 Handling exceptions . 75 5.3.8 Message driven beans . 75 5.3.9 Programming for portability . 76 5.4 Database connections with EJB . 76 5.4.1 Mapping EJBs to the database . 77 5.4.2 When to use EJBs. 88 iv Programming J2EE APIs with WebSphere Advanced 5.5 Security concepts . 93 5.5.1 Authentication . 94 5.5.2 Authorization . 95 5.5.3 WebSphere security . 96 5.5.4 WebSphere 4.0 custom registry . 97 5.5.5 Bean managed security . 98 5.6 VA Java and EJBs . 100 5.7 XML deployment descriptor . 102 5.8 EJB-JAR . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages372 Page
-
File Size-