VisualAge Pacbase. for e-business Applications. Front cover. ibm.com/redbooks. An overview of VisualAge Pacbase V3



Similar documents
Active Directory Synchronization with Lotus ADSync

IBM DB2 Data Archive Expert for z/os:

Redbooks Redpaper. IBM TotalStorage NAS Advantages of the Windows Powered OS. Roland Tretau

IBM VisualAge for Java,Version3.5. Remote Access to Tool API

Release Notes. IBM Tivoli Identity Manager Oracle Database Adapter. Version First Edition (December 7, 2007)

Case Study: Process SOA Scenario

Integrating ERP and CRM Applications with IBM WebSphere Cast Iron IBM Redbooks Solution Guide

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Disaster Recovery Procedures for Microsoft SQL 2000 and 2005 using N series

Redpaper. IBM Workplace Collaborative Learning 2.5. A Guide to Skills Management. Front cover. ibm.com/redbooks. Using the skills dictionary

Big Data Analytics with IBM Cognos BI Dynamic Query IBM Redbooks Solution Guide

IBM Tivoli Web Response Monitor

IBM Rational Rhapsody NoMagic Magicdraw: Integration Page 1/9. MagicDraw UML - IBM Rational Rhapsody. Integration

Tivoli Endpoint Manager for Security and Compliance Analytics. Setup Guide

IBM Financial Transaction Manager for ACH Services IBM Redbooks Solution Guide

IBM Security QRadar Version (MR1) Checking the Integrity of Event and Flow Logs Technical Note

Platform LSF Version 9 Release 1.2. Migrating on Windows SC

IBM Security QRadar Version (MR1) Replacing the SSL Certificate Technical Note

IBM Cognos Controller Version New Features Guide

Tivoli IBM Tivoli Monitoring for Transaction Performance

IBM SmartCloud Analytics - Log Analysis. Anomaly App. Version 1.2

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

IBM Configuring Rational Insight and later for Rational Asset Manager

Tivoli Endpoint Manager for Security and Compliance Analytics

IBM Cognos Controller Version New Features Guide

Tivoli Endpoint Manager for Configuration Management. User s Guide

Patch Management for Red Hat Enterprise Linux. User s Guide

Rapid Data Backup and Restore Using NFS on IBM ProtecTIER TS7620 Deduplication Appliance Express IBM Redbooks Solution Guide

OS Deployment V2.0. User s Guide

Creating Applications in Bluemix using the Microservices Approach IBM Redbooks Solution Guide

IBM WebSphere Data Interchange V3.3

Redpaper. IBM Tivoli Storage Manager: Bare Machine Recovery for. Front cover. ibm.com/redbooks

SW5706 Application deployment problems

IBM Security QRadar Version Installing QRadar with a Bootable USB Flash-drive Technical Note

Installing on Windows

IBM Enterprise Content Management Software Requirements

IBM Enterprise Marketing Management. Domain Name Options for

Installing and using the webscurity webapp.secure client

IBM Endpoint Manager Version 9.2. Software Use Analysis Upgrading Guide

Getting Started with IBM Bluemix: Web Application Hosting Scenario on Java Liberty IBM Redbooks Solution Guide

Rational Developer for IBM i (RDi) Introduction to RDi

IBM White Paper: IBM Maximo 7.1 Integration Framework Architecture Basics

CS z/os Network Security Configuration Assistant GUI

IBM z13 for Mobile Applications

WebSphere Application Server V6: Diagnostic Data. It includes information about the following: JVM logs (SystemOut and SystemErr)

IBM TRIRIGA Version 10 Release 4.2. Inventory Management User Guide IBM

Redbooks Paper. Local versus Remote Database Access: A Performance Test. Victor Chao Leticia Cruz Nin Lei

IBM FileNet Capture and IBM Datacap

CS z/os Application Enhancements: Introduction to Advanced Encryption Standards (AES)

IBM WebSphere Message Broker - Integrating Tivoli Federated Identity Manager

FileNet Integrated Document Management Technical Bulletin

Packet Capture Users Guide

IBM PowerSC Technical Overview IBM Redbooks Solution Guide

Version 8.2. Tivoli Endpoint Manager for Asset Discovery User's Guide

Reading multi-temperature data with Cúram SPMP Analytics

IBM Enterprise Marketing Management. Domain Name Options for

Sametime Version 9. Integration Guide. Integrating Sametime 9 with Domino 9, inotes 9, Connections 4.5, and WebSphere Portal

Implementing the End User Experience Monitoring Solution

IBM Security QRadar Version Common Ports Guide

iseries Access for Web V5R2 and WebSphere Host Publisher V4.0

IBM FileNet System Monitor FSM Event Integration Whitepaper SC

QLogic 8Gb FC Single-port and Dual-port HBAs for IBM System x IBM System x at-a-glance guide

Linux. Managing security compliance

Rational Reporting. Module 3: IBM Rational Insight and IBM Cognos Data Manager

Redpaper. Integrating Host Applications with e-business Portals. Front cover. ibm.com/redbooks

Implementation Best Practices for IBM Tivoli License Manager

WebSphere Commerce V7.0

IBM Network Advisor IBM Redbooks Product Guide

QLogic 4Gb Fibre Channel Expansion Card (CIOv) for IBM BladeCenter IBM BladeCenter at-a-glance guide

IBM Security QRadar Version (MR1) Configuring Custom Notifications Technical Note

Remote Support Proxy Installation and User's Guide

B2B e-commerce. with WebSphere Commerce Business Edition V5.4 Patterns for e-business Series. Front cover. ibm.com/redbooks

Rational Developer for IBM i (RDi) Working offline using i Projects

Getting Started With IBM Cúram Universal Access Entry Edition

Tivoli Security Compliance Manager. Version 5.1 April, Collector and Message Reference Addendum

IBM Software Group. SW5706 JVM Tools IBM Corporation 4.0. This presentation will act as an introduction to JVM tools.

Featuring: GUI screen designer to edit DDS source for 5250 Display Files

IBM XIV Management Tools Version 4.7. Release Notes IBM

Redpaper. IBM Tivoli Storage Manager: Bare Machine Recovery for Microsoft Windows 2003 and XP. Front cover. ibm.com/redbooks

IBM Lotus Enterprise Integrator (LEI) for Domino. Version August 17, 2010

TIBCO Administrator User s Guide. Software Release March 2012

IBM DB2 for Linux, UNIX, and Windows. Deploying IBM DB2 Express-C with PHP on Ubuntu Linux

Redpaper. Lotus Notes access for SAP solutions. Front cover. ibm.com/redbooks. Out-of-the-box SAP integration for your Lotus Notes users

IBM Flex System PCIe Expansion Node IBM Redbooks Product Guide

WebSphere Business Modeler Advanced. Defining metrics and KPIs to monitor your business

IBM Rational Web Developer for WebSphere Software Version 6.0

IBM Endpoint Manager for Software Use Analysis Version 9 Release 0. Customizing the software catalog

Brocade Enterprise 20-port, 20-port, and 10-port 8Gb SAN Switch Modules IBM BladeCenter at-a-glance guide

Remote Control Tivoli Endpoint Manager - TRC User's Guide

IBM TRIRIGA Application Platform Version Reporting: Creating Cross-Tab Reports in BIRT

New!! - Higher performance for Windows and UNIX environments

International Technical Support Organization. Linux Application Development Using WebSphere Studio 5

DataPower z/os crypto integration

Sterling Supplier Portal. Overview Guide. DocumentationDate:9June2013

InfoPrint 4247 Serial Matrix Printers. Remote Printer Management Utility For InfoPrint Serial Matrix Printers

Database lifecycle management

AD04 - Batch Modernization Strategies for Mainframe Environments

White paper. IBM WebSphere Application Server architecture

Deployment Guide Series

Transcription:

Front cover VisualAge Pacbase for e-business Applications An overview of VisualAge Pacbase V3 Step-by-by guide to develop an e-business application Develop JSPs and EJBs Richard Brijde Randall Holleger David Quantin ibm.com/redbooks

International Technical Support Organization VisualAge Pacbase for e-business Applications December 2002 SG24-6201-00

Note: Before using this information and the product it supports, read the information in Notices on page xiii. First Edition (December 2002) This edition applies to VisualAge Pacbase Version 3 for use with the Microsoft NT 4.0 SP 5 operating system, VisualAge for Java 3.02, WebSphere Studio 3.0, and WebSphere Application Server 3.02 Enterprise Edition. Copyright International Business Machines Corporation 2002. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents Notices...................................................... xiii Trademarks................................................... xiv Preface...................................................... xv The team that wrote this redbook................................... xv Become a published author....................................... xvi Comments welcome............................................ xvii Part 1. e-business application development..................................... 1 Chapter 1. VisualAge Pacbase overview............................ 3 1.1 Definitions and terminology..................................... 4 1.2 Methodology support.......................................... 5 1.3 Components................................................ 5 1.4 Support for e-business........................................ 6 Chapter 2. VisualAge Pacbase targeted application architecture....... 7 2.1 About Web applications........................................ 8 2.2 Main architectures............................................ 8 2.3 Commonly encountered problems.............................. 13 2.4 JSPs/servlet architecture main components....................... 14 2.4.1 HTML pages........................................... 15 2.4.2 Servlets............................................... 15 2.4.3 JavaBeans............................................ 15 2.4.4 JSPs................................................. 16 2.5 VisualAge Pacbase proxy..................................... 16 2.6 Application architecture overview............................... 17 2.6.1 Introduction to patterns................................... 18 2.6.2 Choosing the business pattern............................. 18 2.6.3 Choosing the application topology.......................... 19 2.6.4 Choosing a runtime topology.............................. 19 2.6.5 Product mapping........................................ 20 2.7 Defining the application architecture............................. 20 2.7.1 Design techniques used.................................. 20 2.7.2 Development approach................................... 22 2.7.3 Development standards.................................. 24 2.8 Basic VisualAge Pacbase architecture........................... 27 2.8.1 Middleware............................................ 27 2.8.2 Listener............................................... 27 Copyright IBM Corp. 2002. All rights reserved. iii

2.8.3 Communications monitor................................. 27 Chapter 3. VisualAge Pacbase products: overview.................. 29 3.1 VisualAge Pacbase 3.0....................................... 30 3.1.1 The Workbench......................................... 30 3.1.2 The repository.......................................... 31 3.2 Other tools................................................. 32 3.2.1 About Rational Rose..................................... 32 3.2.2 About VisualAge for Java................................. 33 3.2.3 About WebSphere Studio................................. 33 3.2.4 About WebSphere Application Server........................ 34 3.2.5 About DB2 Universal Database............................ 34 3.2.6 About MQSeries........................................ 34 3.3 Tools integration............................................ 35 3.3.1 Integration of Rational Rose with VisualAge Pacbase........... 35 3.3.2 Integration of Rational Rose with VisualAge for Java............ 35 3.3.3 Integration of VisualAge for Java with WebSphere Studio........ 35 3.3.4 Integration of VisualAge for Java with WAS................... 36 3.3.5 Integration of WebSphere Studio with WAS................... 36 3.3.6 Integration of WebSphere Application Server with DB2.......... 36 3.3.7 Complete product environment............................. 37 Chapter 4. Environment setup, installation, and administration....... 39 4.1 Installation/setup: VisualAge Pacbase 3.0 repository................ 40 4.1.1 Special considerations................................... 40 4.1.2 Running the installation................................... 40 4.2 Installing the VisualAge Pacbase Workbench...................... 69 4.2.1 Installation............................................. 69 4.3 Impacts on other tools........................................ 92 4.3.1 Installing the WebSphere test environment feature............. 92 4.3.2 Installing the VisualAge Pacbase Java environment............ 93 4.4 VisualAge Pacbase 3.0: Site administration...................... 100 4.4.1 Starting the administrator Workbench....................... 101 4.4.2 Menu bar............................................. 104 4.4.3 Using the administrator Workbench........................ 113 4.4.4 Command lines........................................ 115 4.4.5 Profiles.............................................. 116 4.4.6 Pac/Transfer.......................................... 120 4.4.7 Users................................................ 128 4.4.8 Tool bar.............................................. 129 4.5 External controls........................................... 130 4.5.1 Validity controls........................................ 131 4.5.2 Initialization controls.................................... 131 iv VisualAge Pacbase for e-business Applications

4.6 VisualAge Pacbase 3.0: Base administration..................... 131 4.6.1 Menu bar............................................. 132 4.6.2 Base administration tab options........................... 132 4.7 VisualAge Pacbase utilities................................... 135 4.7.1 Changes from previous releases.......................... 135 4.7.2 New to this release..................................... 136 Chapter 5. VisualAge Pacbase 3.0 development................... 137 5.1 The Workbench in general................................... 138 5.1.1 Logging on........................................... 138 5.1.2 Quick tour of the Workbench.............................. 139 5.2 The workspace manager..................................... 149 5.2.1 The local update tab.................................... 150 5.2.2 All problems tab....................................... 152 5.2.3 Libraries............................................. 152 5.2.4 Log tab.............................................. 152 5.3 Generation manager........................................ 152 5.3.1 Generation command lines............................... 153 5.3.2 JCL................................................. 155 5.4 Programming concepts...................................... 155 5.5 Development with the e-business Workbench.................... 158 5.5.1 Data elements......................................... 158 5.5.2 Segments............................................ 161 5.5.3 Programs............................................. 164 5.5.4 Logical views.......................................... 171 5.5.5 Elementary components................................. 172 5.5.6 e-business application................................... 178 5.5.7 Folders.............................................. 180 5.5.8 Communication monitors................................ 182 Chapter 6. Reuse and portability in VisualAge Pacbase............. 185 6.1 Reusability................................................ 186 6.1.1 Reusable components.................................. 186 6.1.2 Organizing the repository for reusability..................... 187 6.1.3 Libraries............................................. 188 6.1.4 Positioning the repository................................ 191 6.2 Data entities.............................................. 191 6.2.1 Data elements......................................... 191 6.2.2 Data structures and segments............................ 192 6.2.3 Database blocks....................................... 192 6.3 Documentation entities...................................... 193 6.3.1 Descriptions.......................................... 193 6.3.2 Publishing facility....................................... 194 Contents v

6.3.3 Parameterized input aid................................. 194 6.4 Processing entities......................................... 194 6.4.1 e-business............................................ 195 6.4.2 Batch programs and macros.............................. 195 6.4.3 Reports.............................................. 196 6.5 Cross-references........................................... 197 6.5.1 Available cross-references............................... 197 6.5.2 Maintenance considerations.............................. 197 6.5.3 Cross-reference considerations........................... 197 6.6 Portability................................................. 199 6.6.1 Repository content..................................... 199 6.6.2 Generated applications.................................. 199 Chapter 7. VisualAge Pacbase development process............... 201 7.1 Overview................................................. 202 7.2 Development paths......................................... 202 7.2.1 Forward development path............................... 202 7.2.2 Analysis and design.................................... 202 7.2.3 Backward development path.............................. 203 7.3 Designing a VisualAge Pacbase application...................... 204 7.3.1 Required components................................... 204 7.3.2 Relation to Unified Modeling Language (UML)................ 204 7.3.3 Relation to the Rational Rose Toolkit....................... 206 7.4 Server-side implementation................................... 206 7.4.1 Building a services node................................. 206 7.4.2 Building a services system............................... 207 7.4.3 Setting a technical context............................... 207 7.4.4 Results.............................................. 208 7.5 Client-side implementation................................... 208 7.5.1 Developing services components.......................... 208 7.5.2 Developing presentation................................. 209 7.5.3 Developing navigation................................... 209 7.5.4 Testing.............................................. 210 7.6 Development process summary............................... 210 7.7 Team considerations........................................ 211 7.7.1 Deployment........................................... 212 Chapter 8. Building services and data access..................... 213 8.1 Logical view............................................... 214 8.2 Elementary component...................................... 214 8.3 The e-business application................................... 215 8.3.1 Error server........................................... 216 8.4 Communication monitor..................................... 216 vi VisualAge Pacbase for e-business Applications

8.5 Folder................................................... 216 8.5.1 The Services Manager.................................. 217 8.5.2 Folder view........................................... 217 8.6 Technical considerations..................................... 218 8.6.1 Technical environment.................................. 218 8.6.2 Building a proxy........................................ 219 8.6.3 Testing the e-business application......................... 227 Chapter 9. The VisualAge Pacbase proxy......................... 229 9.1 What is a VAP proxy?....................................... 230 9.2 Proxy features............................................. 231 9.2.1 Overview............................................. 231 9.2.2 Hierarchy of generated proxies............................ 232 9.2.3 Public services of generated proxies....................... 234 9.2.4 More about proxy dynamics.............................. 240 Chapter 10. Building the model layer............................ 245 10.1 Useful patterns........................................... 246 10.1.1 Singleton pattern...................................... 246 10.1.2 Implementing the singleton pattern in Java.................. 246 10.1.3 Factory pattern....................................... 247 10.1.4 Command pattern..................................... 248 10.2 Command framework...................................... 249 10.2.1 Command interface.................................... 249 10.2.2 CommandException................................... 250 10.2.3 CommandFactory..................................... 252 10.2.4 Command programming process......................... 252 10.3 Business object framework.................................. 252 10.3.1 BusinessObject interface............................... 253 10.3.2 BusinessObjectFactory................................. 253 10.3.3 Business object programming process..................... 255 10.3.4 Relation to the command............................... 255 10.4 Model layer summary...................................... 255 Chapter 11. Creating presentation with JSPs...................... 257 11.1 Introduction to JavaServer pages............................. 258 11.2 Components of JavaServer pages............................ 258 11.2.1 JSP directives........................................ 259 11.2.2 Page directive........................................ 259 11.2.3 JSP scripting......................................... 260 11.2.4 Comments........................................... 261 11.2.5 JSP actions.......................................... 262 11.2.6 About WebSphere specific tags.......................... 263 11.3 Implementing the presentation............................... 263 Contents vii

11.3.1 Programming process.................................. 263 11.3.2 JSP tags guidelines.................................... 264 11.3.3 A very simple example using the DataDeliveryBean.......... 264 11.4 Implementing wireless presentation using JSP................... 265 11.4.1 About the Wireless Application Protocol (WAP).............. 265 11.4.2 Serving dynamic WML content using servlets and JSPs....... 265 11.4.3 WAP relative to our e-business architecture................. 266 Chapter 12. Implementing navigation with servlets................. 267 12.1 Introduction to Java servlets................................. 268 12.1.1 Servlet process flow................................... 268 12.1.2 The Java Servlet API.................................. 268 12.1.3 Persistency management............................... 269 12.1.4 Session............................................. 270 12.2 Implementing the navigation................................. 271 12.2.1 Programming process.................................. 271 12.2.2 Granularity........................................... 272 12.2.3 Control mechanism and navigation........................ 272 12.2.4 Non JSP resulting servlets.............................. 273 12.2.5 A generic controller servlet.............................. 275 Chapter 13. Testing and deployment............................. 277 13.1 Using the VisualAge Pacbase Test Tool........................ 278 13.1.1 Installing the tool...................................... 278 13.1.2 Configuring the tool.................................... 279 13.1.3 Running the tool...................................... 281 13.2 Other client-side test tools................................... 283 13.3 Deploying an e-business application........................... 283 13.3.1 Deploying server side components........................ 284 13.3.2 Deploying HTML pages and JSPs........................ 284 13.3.3 Deploying servlets and JavaBeans........................ 286 13.4 Runtime testing........................................... 286 Part 2. VisualAge Pacbase Cruise Lines sample application...................... 287 Chapter 14. VisualAge Cruise Lines application specifications....... 289 14.1 VisualAge Cruise Lines background........................... 290 14.2 VisualAge Cruise Lines requirements.......................... 290 14.3 Data considerations........................................ 291 14.3.1 Objects............................................. 291 14.3.2 Relationships......................................... 292 14.3.3 Data implementation................................... 293 14.4 Processing considerations and implementation.................. 297 14.5 VisualAge Cruise Lines customer reservation.................... 299 viii VisualAge Pacbase for e-business Applications

14.6 VisualAge Cruise Lines management.......................... 304 Chapter 15. Bridging from Rational Rose......................... 309 15.1 Overview................................................ 310 15.2 Approach................................................ 310 15.2.1 Using Rational Rose................................... 310 15.2.2 Using the bridge...................................... 311 15.2.3 Using VisualAge Pacbase............................... 311 15.3 Constraints.............................................. 311 15.3.1 Packages, diagrams, and folder.......................... 311 15.3.2 Class diagrams....................................... 312 15.3.3 Classes and attributes.................................. 312 15.3.4 Operations........................................... 312 15.3.5 Inheritance.......................................... 313 15.3.6 Relations............................................ 313 15.3.7 Aggregation and references............................. 313 15.3.8 Associatives......................................... 314 15.3.9 Installed bridge....................................... 316 15.4 Operating the bridge....................................... 317 15.4.1 Importing the Rose model............................... 318 15.4.2 Generating the VisualAge Pacbase entities................. 320 15.4.3 Completing the imported entities.......................... 323 Chapter 16. Completing server development...................... 325 16.1 Logical views............................................. 326 16.1.1 Cruise.............................................. 326 16.1.2 CruiseLine........................................... 327 16.1.3 Reservation.......................................... 327 16.1.4 Ship................................................ 328 16.2 Elementary components.................................... 329 16.2.1 Cruise.............................................. 329 16.2.2 CruiseLine........................................... 330 16.2.3 Reservation.......................................... 332 16.2.4 Ship................................................ 333 16.3 Folders................................................. 335 16.3.1 Reservation.......................................... 335 16.3.2 CruiseLine........................................... 336 16.4 Generating............................................... 340 16.4.1 Proxy generation...................................... 340 Chapter 17. Developing JavaBeans.............................. 343 17.1 Preparing the VisualAge environment.......................... 344 17.1.1 Creating the VisualAge projects.......................... 344 17.1.2 Creating the Java packages............................. 345 Contents ix

17.1.3 WebSphere Test Environment setup...................... 346 17.1.4 Importing the VisualAge Pacbase proxies.................. 348 17.2 Developing the business objects.............................. 349 17.2.1 Identifying the business objects.......................... 349 17.2.2 Destination business object............................. 350 17.2.3 CruiseLineBusinessObject.............................. 354 17.2.4 ReservationBusinessObject............................. 358 17.3 Developing commands..................................... 359 17.3.1 Identifying the commands............................... 359 17.3.2 Destination commands................................. 360 17.3.3 Cruise line commands.................................. 366 17.3.4 Reservation commands................................ 371 Chapter 18. Building JSPs and servlets.......................... 375 18.1 Preparing the WebSphere Studio environment................... 376 18.1.1 Creating the WebSphere Studio project.................... 376 18.1.2 Setting versions for the JSP and the application server........ 376 18.1.3 Creating the folders.................................... 378 18.1.4 Customizing the stages................................. 379 18.2 Implementing HTML pages.................................. 380 18.3 Developing the JavaServer pages............................ 382 18.3.1 Employee JSPs....................................... 382 18.3.2 Customer JSPs....................................... 384 18.3.3 CommandException.JSP............................... 387 18.4 Developing the DataDeliveryBeans............................ 388 18.4.1 Identifying the DataDeliveryBeans........................ 388 18.4.2 Destination DataDeliveryBeans.......................... 388 18.4.3 Cruise line DataDeliveryBeans........................... 389 18.4.4 Reservation DataDeliveryBeans.......................... 391 18.5 Developing the servlets..................................... 392 18.5.1 Identifying the servlets................................. 392 18.5.2 Destination servlets.................................... 393 18.5.3 GetUniqueDestinationServlet............................ 397 18.5.4 Cruise line servlets.................................... 400 18.5.5 Reservation servlets................................... 406 18.6 Introducing the WAP application.............................. 408 18.6.1 Adapting the presentation to the WAP..................... 409 18.6.2 Developing the WML-based JSPs........................ 409 18.6.3 Subclassing the servlets................................ 413 18.6.4 Testing with the WAP application......................... 415 Chapter 19. Deploying the application........................... 417 19.1 Deploying the VisualAge Cruise Lines Application................ 418 x VisualAge Pacbase for e-business Applications

19.1.1 Creating the VisualAge Cruise Lines Web application......... 418 19.1.2 Creating the required Web application directories............ 422 19.1.3 Deploying files to WAS................................. 423 19.1.4 Starting the Web application............................. 425 19.1.5 Defining servlets...................................... 426 19.2 Additional deployment considerations.......................... 426 19.2.1 The e-business application.............................. 426 19.2.2 Communications monitor............................... 427 19.2.3 Working file.......................................... 428 19.2.4 Error server.......................................... 428 Part 3. Appendixes........................................................ 429 Appendix A. Additional material................................ 431 Locating the Web material....................................... 431 Using the Web material......................................... 431 System requirements for downloading the Web material............. 432 How to use the Web material.................................. 432 Related publications.......................................... 435 IBM Redbooks................................................ 435 Other resources............................................ 436 Referenced Web sites.......................................... 436 How to get IBM Redbooks....................................... 437 IBM Redbooks collections..................................... 437 Index....................................................... 439 Contents xi

xii VisualAge Pacbase for e-business Applications

Notices This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-ibm product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-ibm Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-ibm products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-ibm products. Questions on the capabilities of non-ibm products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces. Copyright IBM Corp. 2002. All rights reserved. xiii

Trademarks The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both: Balance CICS DB2 DB2 Universal Database IBM IBM eserver MQSeries MVS Perform RACF Redbooks Redbooks (logo) SP VisualAge WebSphere The following terms are trademarks of International Business Machines Corporation and Lotus Development Corporation in the United States, other countries, or both: Approach Lotus Word Pro The following terms are trademarks of other companies: Rational Rose and UML are trademarks of the Rational Software Corporation in the United States, other countries, or both. ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the United States, other countries, or both. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. C-bus is a trademark of Corollary, Inc. in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. SET, SET Secure Electronic Transaction, and the SET Logo are trademarks owned by SET Secure Electronic Transaction LLC. Other company, product, and service names may be trademarks or service marks of others. xiv VisualAge Pacbase for e-business Applications

Preface This IBM Redbook provides you with information that will allow you to use VisualAge Pacbase 3.0 (VAP) to create, manage, and deploy e-business applications in an application repository environment. In Part 1, we focus on the installation of VisualAge Pacbase and the administration and use of the product. We describe the targeted application architecture and provide an overview of the products, other required tools, and their integration with VisualAge Pacbase, as well as the VisualAge Pacbase development model. We discuss how VisualAge Pacbase provides reuse and portability of the application components and how to build services and accomplish data access. We present the advantages of using the VisualAge Pacbase proxy for e-business applications and explain how to build a view with the proxy on the client side of the application. As part of the proxy discussion, we cover the use of JSPs for presentation and explain how to use the VisualAge Pacbase proxy to quickly develop JSPs using WebSphere Studio. Finally, we show how to implement navigation in the servlets with WebSphere Studio and Visual Age Java and how to test and deploy the completed e-business application. In Part 2, we develop an e-business application using VisualAge Pacbase 3.0, WebSphere Studio, and VisualAge for Java. We discuss design, construction, testing, and implementation. Our sample application establishes a Web site for the VisualAge Cruise Line sample and provides a WAP version of the implementation as well. The team that wrote this redbook This redbook was produced by a team of specialists from around the world working at the International Technical Support Organization, San Jose Center. Richard Brijde is a VAP Specialist with New Age Consultancy in The Netherlands. He teaches VAP classes and supports a variety of client projects. Randall Holleger is a Product Implementation Manager with e-applications Solutions Group in the United States. He has 20 years of experience with the VisualAge Pacbase products and teaches classes in VisualAge Pacbase administration and development. Copyright IBM Corp. 2002. All rights reserved. xv

David Quantin is an e-business Specialist with IBM Global Services based in Paris, France. He has 5 years of experience in software development and consulting in both private and government sectors. He is currently working on e-business projects centered around WebSphere technology and developed with VisualAge for Java. The redbook authors express their thanks to the following people for their invaluable contributions to this project: Anne-Marie Hue, for her assistance in organizing the redbook, managing the effort in Noisy Le Grand, and coordinating the activity between the development team and the redbook authors Sebastien Alonzo, for his assistance in reviewing the content Bruno Charpentier, for his assistance in developing the sample application Joe DeCarlo, for his ongoing support in all aspects of redbook publishing and ITSO project management IBM Paris Lab development team, for their timely assistance in various aspects of the VisualAge Pacbase product Become a published author Join us for a two- to six-week residency program! Help write an IBM Redbook dealing with specific products or solutions, while getting hands-on experience with leading-edge technologies. You'll team with IBM technical professionals, Business Partners and/or customers. Your efforts will help increase product acceptance and customer satisfaction. As a bonus, you'll develop a network of contacts in IBM development labs, and increase your productivity and marketability. Find out more about the residency program, browse the residency index, and apply online at: ibm.com/redbooks/residencies.html xvi VisualAge Pacbase for e-business Applications

Comments welcome Your comments are important to us! We want our Redbooks to be as helpful as possible. Send us your comments 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: IBM Corporation, International Technical Support Organization Dept. 1WLB Building 80-E2 650 Harry Road San Jose, California 95120-6099 Preface xvii

xviii VisualAge Pacbase for e-business Applications

Part 1 Part 1 e-business application development In Part 1, we focus on the installation of VisualAge Pacbase and the administration and use of the product. We describe the targeted application architecture and provide an overview of the products, other required tools, and their integration with VisualAge Pacbase, as well as the VisualAge Pacbase development model. We discuss how VisualAge Pacbase provides reuse and portability of the application components and how to build services and accomplish data access. We present the advantages of using the VisualAge Pacbase proxy for e-business applications and explain how to build a view with the proxy on the client side of the application. As part of the proxy discussion, we cover the use of JSPs for presentation and explain how to use the VisualAge Pacbase proxy to quickly develop JSPs using WebSphere Studio. Finally, we show how to implement navigation in the servlets with WebSphere Studio and Visual Age Java and how to test and deploy the completed e-business application. Copyright IBM Corp. 2002. All rights reserved. 1

2 VisualAge Pacbase for e-business Applications

1 Chapter 1. VisualAge Pacbase overview In this chapter we provide an overview of the functional areas to be covered in this redbook, which deals with VisualAge Pacbase 3.0 as it relates to VisualAge Java and WebSphere Studio. Additional information on VisualAge Pacbase can be obtained at: http://www.ibm.com/software/ad/vapacbase Copyright IBM Corp. 2002. All rights reserved. 3

1.1 Definitions and terminology VisualAge Pacbase is a repository-based application development tool that supports the full range of e-business application development activity, including analysis, design, construction, testing, and implementation, as well as ongoing maintenance and enhancements. VisualAge Pacbase offers the following advantages for e-business applications: Use of the proxy object Accelerated development and deployment of Web-based applications Integration with latest technology Reusability of application components Proxy objects enable developers to directly access data, services, and events available on the server. Using a proxy optimizes network traffic at runtime and utilizes local cache management. The proxy establishes a public interface that hides complex mechanisms associated with the middleware, local cache, paging, and error management. VisualAge Pacbase 3.0 implements a modern development environment intended to provide a visual programming approach supported by SmartGuides. This development environment consists of a set of files used to manage the components of your applications. Collectively, these files and the software to manage them are referred to as the VisualAge Pacbase repository. Developers accomplish their activity within their own local versions of the repository. Local repository versions are then synchronized with the server repository. This establishes the server repository as the authoritative source of application components. This approach enables application components to be reused by other developers to build additional e-business applications and results in greater reliability and presentation consistency of applications. VisualAge Pacbase 3.0 operates on a variety of hardware platforms and operating systems. The discussion in this redbook is limited to the version running on Windows NT 4.0 on an IBM-compatible computer. WebSphere Studio and VisualAge Pacbase are complementary solutions for building scalable e-business applications. We used VisualAge Java 3.02 and WebSphere Studio 3.0 to demonstrate the proxy capabilities of VisualAge Pacbase. This redbook assumes that you have very little previous knowledge of VisualAge Pacbase. Using this redbook, you can install and use the product. If you have experience with VisualAge Pacbase you will recognize many new features in this complete new design of the product. These include: Improved administration through the administrator Workbench Physical restructuring of the repository 4 VisualAge Pacbase for e-business Applications

Additional validation and initialization of entity definitions and descriptions through the use of customizable scripts Separation of the report entity from the data structure entity A facility to document macro parameters Classification of the general documentation screen into comments, options, and its use to specify error messages A facility to duplicate an entire entity rather than having to copy each part of the entity User profiles to manage repository access Consolidation of batch administrative procedures Both the developer s and administrator s Workbenches have been completely redesigned to create a more natural flow of activity. SmartGuides have been included to guide the developer and administrator through complex tasks. 1.2 Methodology support Unified Modeling Language (UML) is supported in addition to more traditional methodologies such as OMT, Merise, and Yourdon. VisualAge Pacbase 3.0 integrates easily with VisualAge Java and includes the capability to transfer information from Rational Rose in order to begin establishing application components in the repository. 1.3 Components The following optional VisualAge Pacbase 3.0 features are not part of the scope of this redbook: Production Environment Interface (PEI) for managing the transition of application components into the production environment Development Support Management System (DSMS) for managing maintenance and enhancement activity Pacbase Update Facility (PUF) for directly updating the repository content Graphical design support (Pacdesign) for producing diagrams and documentation using the conventions of a specific methodology such as the Unified Modeling Language (UML) Meta-entities (formerly user-entities) that extend the standard set of things managed by the VisualAge Pacbase repository Chapter 1. VisualAge Pacbase overview 5

VisualAge Pacbase 3.0 requires workstations with a recommended 128 MB RAM supporting a Java runtime environment and the appropriate middleware or a gateway accessible through TCP-IP. A processor speed of 233 mhz is recommended along with 500 MB of free disk space. 128 MB of RAM is specified with 256 MB recommended for optimal performance. In addition, VisualAge Pacbase 3.0 requires Internet Explorer 4.0 or later, or Netscape Navigator 4.0 or later, as the browser for on-line help. 1.4 Support for e-business VisualAge Pacbase supports e-business development projects with any number of developers for projects of all sizes and levels of complexity within any industry. VisualAge Pacbase 3.0 runs in both IBM and non-ibm environments. For more information concerning any specific hardware environment or operating system contact IBM or visit the IBM VisualAge Pacbase Web site at: http://www.software.ibm.com/ad/ Developers customize their VisualAge Pacbase development workstations to a look and feel that will increase the productivity of the developer. VisualAge Pacbase 3.0 supports both English and French language development. Inquiries regarding other language support should be directed to IBM. VisualAge Pacbase offers a practical solution to increase the use of Java technology while providing a multi-user repository-based approach to e-business application development. You can easily Web-enable existing applications with VisualAge Pacbase. By defining a minimal number of entities within the VisualAge Pacbase repository, the necessary components can be generated and deployed to successfully interact with pre-existing applications. 6 VisualAge Pacbase for e-business Applications

2 Chapter 2. VisualAge Pacbase targeted application architecture In this chapter we present a short overview of the type of Web applications we intend to develop in terms of runtime environment and physical structure. We cover the problems commonly encountered during such development. Also, we describe the details of the client architecture we intend to use for the VisualAge Cruise Lines sample application. Copyright IBM Corp. 2002. All rights reserved. 7

2.1 About Web applications In this topic we introduce the main types of Web architectures and discuss common problems that you may encounter. 2.2 Main architectures During the last five years, a variety of architectures have been designed and tested for Web applications. In this section, we review the ones used most often. One-layer architecture The one-layer architecture refers to an architecture that is local to the client and does not involve the server. In this architecture, the HTML browser or the client application present local files to the user. Figure 2-1 illustrates this one-layer architecture. Client Server HTML Browser URL Files * HTML * GIF/JPEG * MOV/AVI * Javascript * Java Applet Figure 2-1 One-layer architecture 8 VisualAge Pacbase for e-business Applications

Two-layer architecture The two-layer architecture is referred to as client/server. Here, the HTML browser can present, to the user, files that come from an HTTP server. Figure 2-2 illustrates this two-layer architecture. Client Server HTML Browser HTTP HTML Server * HTML * GIF/JPEG * MOV/AVI * Javascript * Java Applet Figure 2-2 Two-layer architecture Chapter 2. VisualAge Pacbase targeted application architecture 9

Two-layer architecture with applets and JDBC Another variation of the client/server architecture can be described as a two-layer architecture with applets and JDBC (Java Data Base Connectivity). In this architecture, the HTML browser typically presents files to the user which come from an HTTP server. In addition, applets can run on the client and access server data through JDBC. Figure 2-3 illustrates this two-layer architecture. Client Server HTML Browser HTTP HTML Server Files * HTML * GIF/JPEG * MOV/AVI * Javascript Java Applet Database JDBC Figure 2-3 Two-layer architecture with applet and JDBC 10 VisualAge Pacbase for e-business Applications

Three-layer architecture: applet/servlet The three-layer architecture is known as applet/servlet. The HTML browser typically presents files to the user which come from an HTTP Server. On the client, applets run and access server data through an applet/servlet communication. Most of the business logic is implemented on the server part and executes in a Java application server. Figure 2-4 illustrates this applet/servlet architecture. Client Server HTML Browser HTTP HTML Server Files * HTML * GIF/JPEG * MOV/AVI * Javascript Java Applet RMI Application Server Java Servlet JDBC RMI Database Figure 2-4 Three-layer architecture with applet-servlet communications Chapter 2. VisualAge Pacbase targeted application architecture 11

Three-layer architecture: JSP/servlet Another form of the three-layer architecture is referred to as JSPs/servlet or thin client architecture. Here, the HTML browser presents files to the user which come from an HTTP Server. The business logic is implemented on the server. The graphic part is processed on the server (JSPs or XML) and delivered to the client as HTML. Figure 2-5 illustrates this thin client architecture. Client Server HTML Browser HTTP Application Server Application Server Java Servlet HTTP Java Bean Legacy JSPs Files Database Figure 2-5 Three-layer architecture with JSPs and servlets This thin client architecture is popular because of the following considerations: Performance: Processing capability is generally greater on the server than on most client machines. Deployment: The application is installed and configured for the server as opposed to a variety of client environments. Maintenance: Locating the processing on the server means that the application components need only to be re-deployed on the server when changes occur. 12 VisualAge Pacbase for e-business Applications

2.3 Commonly encountered problems Regardless of the architecture, the following issues and problems are usually encountered and need to be addressed: Communication/middleware Performance Traffic loads Security Data integrity Existing legacy applications Persistence management Communication/middleware Communication/middleware problems result when an architecture is chosen that distributes processing between the client and the server. Basically, each client environment can have its own characteristics, specifically the communication protocol that it uses to communicate with other servers. All of the machines that need to interact must have some common basis for communication. This is referred to as the middleware. The middleware must be capable of handling the communications efficiently between all of the machines that participate in the application s architecture. Performance Performance problems can result when an architecture is chosen that distributes processing, particularly data access, between the client and the server. Response time can be hindered as a slow client processor attempts to retrieve and present data that is not local. Presentation is also affected by the client processor. Applications that perform well on one client can be frustrating on another. Traffic loads Traffic loads can result when an architecture is chosen that places the processing and data access on the server. This occurs when the server environment is not sufficient to handle the processing and communication load presented by the multitude of clients it services. Chapter 2. VisualAge Pacbase targeted application architecture 13

Security Security issues can result when an architecture is chosen that distributes processing, particularly data access, between the client and the server. This occurs because of the possibility of having local copies of data that contain sensitive information. It is generally more difficult to protect the client machines from unauthorized use than it is to safeguard a server. In addition, disaster recovery issues can become more complex when several clients need to be re-synchronized in the event of a catastrophic failure. Data integrity Data integrity issues can result when an architecture is chosen that distributes processing and particularly, data access, between the client and the server. This occurs because of the possibility of having local copies of data and the possibility that two clients can make local changes to the same data. Eventually, when this data is synchronized to a common data source, a conflict results because the synchronization process has no way of knowing which version of the data should take precedence. In addition, data integrity may be compromised on the client machine through the use of tools and utilities that may manipulate the data from outside the application. Interfaces to legacy applications Another problem area concerns legacy applications. Deployed applications generally are not independent in terms of the data that they use and normally need to support an overall workflow for an end-user. The workflow is made up of a variety of applications that need to interact. The complexity of this interaction is a function of how distributed the data and processing are for a given architecture. Persistence management Depending on the design of an application, some data and objects may need to be persistent. This means that they need to be retained from one part of an application to another or from one execution of the application to a subsequent execution of that application. The problem occurs because an end-user may not necessarily use the same machine each time the application is needed and yet certain data or objects must remain persistent. The degree that the processing and data are distributed in the architecture can add to the complexity of making persistent data and objects available. 2.4 JSPs/servlet architecture main components In this topic we present an overview of the JSPs/servlet main components. 14 VisualAge Pacbase for e-business Applications