Home > Store

WebSphere Version 4 Application Development Handbook

Register your product to gain access to bonus material or receive a coupon.

WebSphere Version 4 Application Development Handbook

Book

  • This product currently is not for sale.
Not for Sale

Description

  • Copyright 2002
  • Dimensions: K
  • Pages: 608
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-009225-8
  • ISBN-13: 978-0-13-009225-0

  • Presents all new coverage of WebSphere Studio Version 4 and VisualAge for Java Version 4
  • Covers streamlining the entire development lifecycle: analysis, design, coding, testing, and deployment
  • Introduces advanced application frameworks: WebSphere Business Components and Jakarta Struts
  • Includes a start-to-finish application case study
  • Complete lifecycle coverage: analysis, design, frameworks, coding, testing, debugging, deployment, and administration
  • Includes extensive coverage of new J2EE support and application development tools
  • An exceptional resource for both new WebSphere developers and those migrating from earlier versions

This is the first systematic and authoritative guide to application development with IBM's WebSphere Version 4.0, VisualAge for Java 4.0, and Java 2 Enterprise Edition. Written by IBM's own WebSphere experts, it covers the entire project lifecycle, focusing on the sophisticated use of automation and WebSphere tools to streamline and accelerate development.

The book offers especially detailed insights into WebSphere Version 4.0's key enhancements—notably, its outstanding support for Java 2 Enterprise Edition. The authors introduce the WebSphere platform, programming model, and application development tools. Then, using a start-to-finish case study, they illuminate every key activity associated with WebSphere development, including installation and configuration; application analysis and design, coding, security configuration, testing, packaging, deployment, and administration.

This book's comprehensive section on analysis and design reviews requirements modeling, object modeling, architecture, code generation, and even the use of powerful new frameworks such as WebSphere Business Components and Jakarta Struts. Highlights also include in-depth coverage of application testing—from automated unit testing with JUnit to debugging and tracing.

INTERNATIONAL TECHNICAL SUPPORT ORGANIZATIONSharing Technical Expertise From Around the World

Prentice Hall PTR has selected this IBM Redbook for its worldwide publishing program. IBM Redbooks are produced by the International Technical Support Organization where experts from around the world work together to build effective technical information based on their practical work experience.

For more information: ibm.com/redbooks

Sample Content

Table of Contents



Preface.


The Team That Wrote This Redbook.


Special Notice.


IBM Trademarks.


Comments Welcome.

I. INTRODUCTION.

1. WebSphere Programming Model.

Characteristics of the Programming Model. Architectures Supported by WebSphere. Web-based Client/Server Applications. Distributed Object-Based Applications. Web-Enabled Distributed Object Applications. Features of a Programming Model Driven Design. Application Components. Browser-Hosted Components. Web Application Server Hosted Components. Distributed Object Server-Hosted Components. Control Flow Mechanisms. Browser Component Initiated Control Flow. Web Application Server Component Initiated Control Flow. Data Flow Sources. Browser-Maintained Data Flow Sources. Web Application Server Maintained Data Flow Sources. Enterprise Server-Maintained Data Sources. Chapter Summary. Summary of Programming Model Aspects. Meeting the Challenges.

2. Tools Overview.

IBM Tools. WebSphere Application Server Version 4.0. WebSphere Studio Version 4.0. VisualAge for Java Version 4.0. WebSphere Business Components Composer. Third Party Tools. Rational Rose. Rational ClearCase. Jakarta Ant. Jakarta Log4J. Jakarta Struts. JUnit.

3. About the PiggyBank Application.

Introducing the PiggyBank Application. What is a Piggy Bank? Functional Overview. Standalone Client. Web Client. Security Functionality. Application Architecture. Application Modules. Common Code. EJBs. Use Cases. Standalone Client. Web Client. Application Implementation. Application Delivery.

II. ANALYSIS AND DESIGN.

4. Overview of Development Activities.

Analysis and Design Activities. Assembling a Development Team. Development Roles. Patterns. Model-View-Controller Pattern. Command Pattern.

5. Requirements Modeling.

Use Case Analysis. PiggyBank Use Cases. PiggyBank Use Case Diagram in Rational Rose. Use Case Descriptions in VisualAge for Java. Use Case Realization. The Basic Approach. Servlet Mapping. MVC Pattern. Facade Pattern. Servlet Multiplexing. Command Pattern. Display Commands. The Value of Commands. Command Granularity. Using Session Beans. Relationship between Command Beans and EJB Session Beans. Caching. External Systems Integration. Representing External Use Cases. Realizing Proxy Use Cases. Representing Agents in VisualAge for Java. Designing the user interface. Screen composition. Navigation. Use case commands. Intermediate commands.

6. Modeling and Code Generation.

Code Generation. Round Tripping. Setting the Default Language for Rose. Code Generation and Reverse Engineering. Code Generation. Reverse Engineering. Integration with VisualAge for Java. VisualAge for Java Rational Rose bridge. XMI Toolkit. Plain Java Files. Designing EJBs with Rational Rose. Creating an EJB with Rose. Generating EJB Code. Importing an EJB from Rose into VisualAge for Java.

7. Designing with Frameworks.

Introduction. Starting with a Framework. What is a Framework? Frameworks Drawbacks. Framework Adoption. Integration with the Tools. Jakarta Struts. When to Use Struts. Servlet Controller. Action Objects. Form Beans. Custom Tags. Internationalization. Code Dependencies. Downsides. Development. WebSphere Business Components Composer. When to use WSBCC. Deployment and Maintenance. Architecture. WSBCC Elements. Development.

III. CODING THE APPLICATION.

8. Setting Up a Development Environment.

Planning for Development. Defining the Deliverables. Choosing Your Tools. Automation Opportunities.

Chapter 9. Development Using the Java 2 Software Development Kit.

Organizing the Project Directory Structure. Using the Java 2 SDK to Build the Application. Tools in the Java 2 SDK. Setting Up the Environment. Compiling the Source Code. Creating the Common JAR File. Creating the EJB JAR File. Creating the Use Case JAR File. Creating the WAR file. Creating the Client JAR File. Generating Documentation. Using Ant to Build a WebSphere Application. What is Ant? Installing and Configuring Ant. Ant Build Files. Built-In Tasks. Creating Build Files for the PiggyBank Application. Master Build File. Building the Common Code. Building the EJBs. Building the Use Cases. Building the Standalone Client Application. Building the Web Application. Further Automation Opportunities Using Ant. Working with Meta-Data. Meta-Data in WebSphere. J2EE Deployment Descriptors. WebSphere Deployment Information. Manifest Information. Creating and Editing Meta-Data Files.

10. Development Using WebSphere Studio.

Developing Web Applications with WebSphere Studio. WebSphere Studio Components. New Features in WebSphere Studio Version 4.0. Structuring the Project in Studio. Working in a Team Environment with Studio. Custom Tag Libraries. Integration with VisualAge for Java. Setup. Interfacing with VisualAge for Java from Studio. Interfacing with Studio from VisualAge for Java. Integration with Other Development Tools. Creating and Publishing WAR Files. Creating the WAR File. Web Services Wizards. Web Services Creation Wizard. Web Services Consumption Wizard.

11. Development Using VisualAge for Java.

The Integrated Development Environment (IDE). Configuring the Projects and Packages. Generating Documentation in VisualAge for Java. Working in a Team Environment. Developing Web Applications with VisualAge for Java. Developing Servlets. Developing JSPs. Developing EJBs in VisualAge for Java. WebSphere Test Environment. Configuration. WebSphere Test Environment Control Center. Servlet Engine. Persistent Name Server. Using DataSource Objects with the WTE. JSP Execution Monitor. Exporting the Code. Exporting the EJB code. EJB Deployment Tool. Debugging in VisualAge for Java.

12. Development with Frameworks.

Jakarta Struts. Using Struts in Your Development Environment. Struts Configuration File. Building a Struts Form. Building a Struts Action. Form Validation. Message Facility. Internationalization. Struts Conclusions. Websphere Business Components Composer. Importing WSBCC into VisualAge for Java. WebSphere Studio Setup. WTE Setup. Automatic Server Startup. Building WSBCC Operations. Extending XML Externalization. Login. Legacy Example. Writing a WSBCC Service. Generic WSBCC Operations. Dealing with Contexts. Defining Formats. Presentation. What We Have Achieved in This Chapter.

13. Guidelines for Coding WebSphere Applications.

Using JNDI. Obtaining an InitialContext. Local and Global JNDI Namespaces. Caching JNDI Lookup Results. Message Logging. Why Do We Need a Logging Framework? What Do We Need from a Logging Framework? Piggybank Log Wrapper. Choosing a Framework. Using the WebSphere JRas Facility. Using Log4J. Logging Conclusions. Coding for Performance. General Performance Tips. JSP and Servlet Performance Tips. EJB Performance Tips. Managing Application Versions. Specifying the Application Name. Partitioning Web applications in the URI Namespace. Partitioning EJBs in the JNDI Namespace. Partitioning Access to Database and Other Resources. Automation Opportunities.

14. Software Configuration Management.

Introduction. Reference.

IV. UNIT TESTING THE APPLICATION.

15. Assembling the Application.

Application Assembly Tool (AAT). Starting the Application Assembly Tool. Using the Interface. Creating a Web Module. Creating an EJB Module. Creating an Application Client Module. Assembling the Complete Application: The EAR File. EJB Deployment Tool. What Does the EJB Deployment Tool Do? When Is the EJB Deployment Tool Executed? Why would I Want to Run the EJB Deployment Tool Myself? Customizing CMP Persistence Mapping. Migrating and Validating EJB JAR Files.

16. Deploying to the Test Environment.

EARExpander Command Line Tool. SEAppInstall Command Line Tool. Single Server Edition: The Browser-Based Console. Starting the Application Server. Launching the Administrative Console in a Browser. Administering Applications Through the Console. Stopping the AEs Application Server. Advanced Edition: The Stand-Alone Console. Start and Stop. Starting the Console. Installing New Applications. Uninstalling Applications. Setting Up Resources. Web Server Plugin. Application Client Resource Configuration Tool. Other Tools in the Advanced Edition. XMLConfig. WSCP. Performing a Unit Test: Executing the Application. Launching the Web Application. Launching the Client Application with the Launchclient Tool.

17. Debugging the Application.

Debugging with VisualAge for Java Version 4.0. Working with Breakpoints. Exceptions. Debugging External Classes. Inspecting Data. Debugging Code Snippets. Debugging with the Distributed Debugger and OLT. Enabling Debugging Support in WebSphere Application Server. Enabling Support in Advanced Edition. Enabling Support in Advanced Edition, Single Server. Using Object Level Trace. Using the Distributed Debugger. Debugging WebSphere Studio Code. A Special Case: How to Debug a JSP. Debugging JSPs in VisualAge for Java. Debugging Studio JSPs: The Distributed Debugger. Debugging JSPs in WebSphere Application Server.

18. Automating Unit Testing Using JUnit.

Unit Testing. What is Unit Testing? Why Unit Testing? Benefits of a Unit Testing Framework. Junit. Installing Junit. Organizing our tests. Test case for a simple Java class. Test case for an EJB. Automating unit testing using Ant. Conclusions.

Appendix A: Additional material.

Locating the Web Material. Using the Web Material. System Requirements for Downloading the Web Material. How to Use the Web Material. Installing and Running the PiggyBank Application. Importing the Sample Code into VisualAge for Java. Using the Ant Samples. Related Publications. IBM Redbooks. Other Resources. Referenced Web Sites. How to Get IBM Redbooks. IBM Redbooks Collections. Special Notices. Abbreviations and Acronyms.

Index.

Preface

Preface

This IBM Redbook provides detailed information on how to develop Webapplications for IBM WebSphere Application Server Version 4 using a variety ofapplication development tools.

The target audience for this book includes team leaders and developers who aresetting up a new J2EE development project using WebSphere Application Serverand related tools. It also includes developers with experience of earlier versionsof the WebSphere product, who are looking to migrate to the Version 4environment.

This book is split into four parts, starting with an introduction, which is followed byparts presenting topics relating to the high-level development activities ofanalysis and design, code, and unit test. A common theme running through allparts of the book is the use of tooling and automation to improve productivity andstreamline the development process.

  • In Part 1 we introduce the WebSphere programming model, the application development tools, and the example application we use in our discussions.
  • In Part 2 we cover the analysis and design process, from requirements modeling through object modeling and code generation to the usage of
  • frameworks.
  • In Part 3 we cover coding and building an application using the Java 2 Software Development Kit, WebSphere Studio Version 4, and VisualAge for Java Version 4. We touch on Software Configuration Management using Rational ClearCase and provide coding guidelines for WebSphere applications. We also cover coding using frameworks, such as Jakarta Struts and WebSphere Business Components.
  • In Part 4 we cover application testing from simple unit testing through application assembly and deployment to debugging and tracing. We also investigate how unit testing can be automated using JUnit.

In our examples we often refer to the PiggyBank application. This is a verysimple J2EE application we created to help illustrate the use of the tools,concepts and principles we describe throughout the book.

The team that wrote this redbook

This redbook was produced by a team of specialists from around the worldworking at the International Technical Support Organization, San Jose Center.

Ueli Wahli is a Consultant IT Specialist at the IBM International TechnicalSupport Organization in San Jose, California. Before joining the ITSO 17 yearsago, Ueli worked in technical support at IBM Switzerland. He writes extensivelyand teaches IBM classes worldwide on application development, objecttechnology, VisualAge products, data dictionaries, and library management. Ueliholds a degree in Mathematics from the Swiss Federal Institute of Technology.

Alex Matthews is a Consulting IT Specialist in the IBM Software Business,based in London, United Kingdom (UK). He has spent the last two and a halfyears providing post-sales services to customers who have purchasedWebSphere products and related tools. Alex has seven years experience buildingdistributed systems using a variety of middleware products. He holds a degree inComputing Science from Aston University, Birmingham, UK.

Paula Coll Lapido works as an IT Specialist in the e-business Innovation Centerat Madrid, Spain. Her current area of expertise focuses on developing e-businessapplications using the WebSphere platform. She has been working at IBM forone year and a half. She holds a degree in Physics from the ComplutenseUniversity of Madrid.

Jean-Pierre Norguet is an IT Specialist, Team Leader and Coach in the IBMe-business department in Belgium. He has been working at IBM for three years.His areas of expertise include the entire application development life cycle. Heholds a 5-year Engineering degree in Computer Science from the UniversiteLibre de Bruxelles and a Socrates European master's degree from the EcoleCentrale Paris.

Special notice

This publication is intended to help application analysts and developers to createWeb applications for WebSphere Application Server using a variety of applicationdevelopment and test tools. The information in this publication is not intended asthe specification of any programming interfaces that are provided by WebSphereApplication Server. See the PUBLICATIONS section of the IBM ProgrammingAnnouncement for WebSphere Application Server for more information aboutwhat publications are considered to be product documentation.

Comments welcome

Your comments are important to us!

We want our IBM Redbooks to be as helpful as possible. Send us yourcomments about this or other Redbooks in one of the following ways:

  • Use the online Contact us review redbook form found at:
    ibm.com/redbooks
  • Send your comments in an Internet note to:
    redbook@us.ibm.com
  • Mail your comments to the address on page ii.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020