Beruflich Dokumente
Kultur Dokumente
VisualAge Pacbase
for e-business
Applications
An overview of VisualAge Pacbase V3
Richard Brijde
Randall Holleger
David Quantin
ibm.com/redbooks
International Technical Support Organization
December 2002
SG24-6201-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page xiii.
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.
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
The team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
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
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
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
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.
The following terms are trademarks of International Business Machines Corporation and Lotus Development
Corporation in the United States, other countries, or both:
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.
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.
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
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
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.
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.
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
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
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/
Also, we describe the details of the client architecture we intend to use for the
VisualAge Cruise Lines sample application.
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.
Client Server
HTML
Browser URL
Files
* HTML
* GIF/JPEG
* MOV/AVI
* Javascript
* Java Applet
Client Server
HTML
Browser HTTP HTML
Server
* HTML
* GIF/JPEG
* MOV/AVI
* Javascript
* Java Applet
Figure 2-2 Two-layer architecture
Client Server
HTML
Browser
HTTP HTML
Server Files
* HTML
* GIF/JPEG
* MOV/AVI
* Javascript
Database
Java
Applet
JDBC
Client Server
HTML
Browser HTTP HTML
Server Files
Client Server
Application Server
Application Server
Java
HTML HTTP Servlet
Browser
Java
HTT Legacy
P Bean
JSPs
Files Database
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.
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.
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.2 Servlets
Servlets are protocol and platform independent server-side software
components, which are written in Java. Servlets run inside a Java enabled server
or application server, such as the WebSphere Application Server. Servlets are
loaded and executed within the Java Virtual Machine (JVM) of the Web server or
application server.
2.4.3 JavaBeans
The JavaBeans API makes it possible to write component software in the Java
programming language. Components are self-contained, reusable software units
that can be visually assembled into composite components, applets,
applications, and servlets using visual application builder tools (for example,
VisualAge for Java). JavaBean components are known simply as Beans.
Beans expose their features (for example, public methods and events) to builder
tools for visual manipulation. This is possible because a Bean's feature name
conforms to specific design patterns. A “JavaBean-enabled” builder tool can then
examine the Bean's patterns, discern its features, and make those features
available for visual manipulation.
2.4.4 JSPs
A basic HTML page is a static document and its content is the same each time it
is presented. JavaServer Pages (JSPs) are similar to HTML files, but provide the
ability to display dynamic content within Web pages.
JSPs are made operable by having their contents (HTML tags, JSP tags and
scripts) translated into a servlet by the application server. This process is
responsible for translating both the dynamic and static elements declared in the
JSP file into Java servlet code that delivers the translated contents through the
Web server output stream to the browser.
Figure 2-6 and Figure 2-7 illustrate the VisualAge Pacbase proxy components.
Folder
methods attributes
events
Client
Proxy
You can see that these patterns cover a wide range of e-business scenarios.
VisualAge Pacbase allows you to work with any of these patterns.
synchronous synchronous /
Presentation Application asynchronous
Application
Development products
The development products are:
VisualAge for Java (Java development)
WebSphere Studio (HTML and JSPs development)
VisualAge Pacbase (Servers)
VisualAge for COBOL (Compiling COBOL servers)
DB2 Universal Database (database development)
Runtime products
The runtime products are:
Windows NT 4.0 (operating system)
WebSphere Application Server Advanced Edition (Java application server)
IBM HTTP Server (HTTP server)
JDK1.1.7 (Java Virtual Machine)
DB2 Universal Database 5.0 (database management)
One of the problems encountered in the use of the Command bean is that
satisfying a particular request can involve a complex set of hierarchical methods.
In order to simplify the work of the Command bean and make responding to the
request more efficient, we use the concept of a business object. A business
object is derived from a proxy and serves as a filter for services. It is called a
business object because the services it contains are specific to the business
logic for the application. The purpose of the business object is to act as a filter for
the services that are available through the proxy. The result is that the application
only implements the services that it has a use for. The business object also
serves to group related services from the proxy.
For more information on the Command pattern and design patterns in general,
please refer to the book “Design Patterns - Elements of Reusable
Object-Oriented Software”, by Gamma, Helm, Johnson and Vlissides, ISBN
0201633612.
Introduction
We use a structured development approach to produce robust, reusable, and
highly maintainable software. This structured development approach is rather
simplistic and is based on the Model-View-Controller and the Command bean
patterns. This approach may need to be modified for large development efforts or
more complex e-business applications.
Figure 2-9 provides an overview of our framework for our e-business application.
Controller Business
Command Proxy
Servlet Object
HttpRequest 1 2
XController
XCommandBean XBusinessObject
Servlet
HttpResponse 4 3
6 5
DataDeliveryBean
7
JSPs XDataDeliveryBean
1 Generic request for services
3 Return of data
,4
5 Constraint for data deliver
inherits from
6 Request for presentation
View: JSPs
When the controller (servlet) obtains the results from the execution of the
business logic (the Command Bean, Business Object), these results need to be
presented to the end user. This is done by having the controller (servlet) manage
the view (JSPs and HTML pages) and instantiate the DataDeliveryBean. The
view is referred to as the presentation logic and is fully independent of the
Command bean-business object interaction. This approach allows us to reuse
the view components (JSPs, HTML pages) even if we change the way the
Command bean satisfies the controller (servlet) request to execute the business
logic. The reverse is also true. We can reuse the business logic and Command
bean as the view components change over time.
Controller: servlet
To summarize, we use a servlet for the controller, which provides the following
services:
It validates the request and session parameters.
It instantiates the Command bean and executes the business logic.
It instantiates and populates the DataDeliveryBean.
It calls the appropriate JSP to complete the presentation logic.
It manages the presentation of the JSPs to add the navigation logic for our
e-business application
Error handling
As you will see later in this book, our development framework works with a
simplified approach to error handling. Basically, we introduce the
CommandException class to handle command exceptions.
The architecture relates to the sequence of events that handles the message that
originates from the browser, through the proxy, and is processed through the
elementary component under the control of the communication monitor.
The process begins with the HTML post (or get) method. The servlet reacts to
the post and determines the task to execute which relates to a command bean.
The command bean, in turn utilizes the VisualAge Pacbase proxy.
2.8.1 Middleware
The middleware component ensures the communication between the client and
the server using standard communication protocol. This is done by the VisualAge
Pacbase proxy through the vaplocat.ini file. The proxy uses the vaplocat.ini file to
get parameters that are specific to the middleware in use and to pass these
parameters to the DLL which will use the parameters along with the data from the
post to format the message for the specific middleware (for example CICS,
Socket, Tuxedo, or MQSeries).
2.8.2 Listener
The listener recognizes and responds to the message from the middleware by
passing the content of the message to the appropriate communications monitor
which is named as a parameter in the middleware message.
The services manager handles all of the elementary components associated with
this e-business application.
As the e-business application executes, the work file is used to control and make
available data that needs to be retained throughout the execution of the various
parts of the e-business application.
In this chapter we briefly describe the products that are used throughout this
redbook:
VisualAge Pacbase 3.0
Rational Rose
VisualAge for Java
WebSphere Studio
WebSphere Application Server
DB2 Universal Database
MQSeries
Our VisualAge Pacbase repository and the VisualAge Pacbase server which we
used for our application were both located on a Windows NT server. We gained
access to the repository using the Workbench which was installed on the
Windows NT-workstations we used.
All of these can be accessed by one or more of the Workbenches. The fact that
all of these are stored in one database does not mean that everyone on the
system has access to all entities. The repository has an adequate security
system that allows a user to access only those parts of the repository that they
need to do their work. This security system is built around the library structure
that VisualAge Pacbase uses to store all the parts needed to build an application.
The VisualAge Pacbase administrator grants developers certain rights to certain
libraries they need to work. Those rights vary from read only access to being able
to alter the code even in a historical session.
VisualAge Pacbase works with sessions. Sessions are part of the key which
VisualAge Pacbase uses to store lines of code in the repository. A session is a
view of the repository as of a certain point in time. You could compare the
VisualAge Pacbase repository with a collector, for example, a coin collector. This
coin collector makes a daily picture of his collection starting from day one until
the present. As time goes by the collection changes, some coins will be sold and
others will be purchased.
If the coin collector someday wants to look at his collection from a year ago, he
just opens the book where he keeps his pictures. He can go to the date that he
wants and take a look. He can even compare it with his current collection. The
only difference between the coin collection and the VisualAge Pacbase
repository is that if you want to take a look at a historical session in VisualAge
Pacbase you can actually hold the coins and even sell them again and again. In
fact you can reuse almost all things in the repository.
These products are not described in detail. For more information on how to install
and develop with VisualAge for Java, WebSphere Studio and WebSphere
Application Server, please refer to Servlet and JSP Programming with IBM
WebSphere Studio and VisualAge for Java, SG24-5755.
For more information on Rational Rose and UML, see the product documentation
and visit the Web site:
http://www.rational.com
For more information on VisualAge for Java, see the product documentation and
visit the Web site:
http://www.ibm.com/software/ad/vaJava/
WebSphere Studio is used to develop, manage and deploy the resources for a
Web site.
WebSphere Studio maintains project files in the file system and provides support
for team development and version control tools.
WebSphere Studio also contains a number of wizards that guide you through
tasks such as SQL statement generation and creation of Web pages to interact
with databases and JavaBeans. You can also use the WebSphere Studio Page
Designer to edit these generated pages or create your own HTML and JSP
pages.
For more information on WebSphere Studio, see the product documentation and
visit the Web site:
http://www.ibm.com/software/webservers/studio/
For more information on DB2 UDB, see the product documentation and visit the
Web site:
http://www.ibm.com/software/data/db2/udb/
For more information on MQSeries, see the product documentation and visit the
Web site:
http://www.ibm.com/software/ts/mqseries/
One way is to use Rational Rose for modeling during the analysis and design
steps. As you proceed, you can use the XML/Toolkit to generate Java classes
from the model and import these classes into VisualAge for Java.
The reverse of this is also available. You can obtain a model from developed
classes through a reverse-engineering process.
You should use this feature to ensure that VisualAge for Java is your primary
Java development and test tool. This allows you to:
Receive updates from VisualAge for Java
Send updates to VisualAge for Java
Use VisualAge for Java as an editor
For more detailed information on this integration please refer to Servlet and JSP
Programming with WebSphere Studio and VisualAge for Java, SG24-5755.
There are two different ways to configure and run the WTE:
SERunner
ServletEngine
Both are detailed in Servlet and JSP Programming with WebSphere Studio and
VisualAge for Java, SG24-5755.
After testing code using the WTE, it is deployed from VisualAge for Java to
WebSphere Application Server, by exporting Java files.
For more detailed information on this integration please refer to Servlet and JSP
Programming with WebSphere Studio and VisualAge for Java, SG24-5755.
ANALYSIS
AND Rational
Analysis Model
DESIGN Rose
-----> Design Model
HTML, WebSphere
JSP Studio
Proxy
Servlet
JavaBean
Business Components
Servlet, Folder
VisualAge
JavaBean Database
for Java
TESTING
Servlet JSP Proxy
WebSphere
JSP VAP Test
Text
Monitor Tool
Environment
DEVELOPMENT
WebSphere VisualAge VisualAge
Studio for Java Pacbase
DEPLOYMENT
Servlets
HTML Folders
JavaBeans
JSPs Elementary Components Database
Proxies
VAP Middleware
(Socket)
DB2
WebSphere
HTTP
Application Server
DB2
We installed the software on the C: drive (the default) for this redbook. If you wish
to install on another drive, substitute the appropriate drive letter.
To install the VisualAge Pacbase server you will need Windows NT or Windows
2000 (there is no Windows 3.x or Windows 95/98 version available). You will also
need Windows Installer 1.1 or higher and Windows Script Host 5.1 minimum.
To support VisualAge Pacbase you will need approximately 500 MB of hard drive
space. This can be on any available drive or combination of drives. The initial
installation will consume nearly 100 MB and the rest of the space will be used for
the data files which will become larger as you begin to populate the VisualAge
Pacbase repository.
The installation takes approximately twenty to forty minutes to complete and can
be accomplished in stages.
Please refer to the VisualAge Pacbase Environment & Installation Guide (chapter
Installation) for a complete description of the installation procedures.
As the installation begins, you will be asked to provide a user name and the
name of your organization, as seen in Figure 4-2.
The user and organization are shown only for documentation purposes.
You can change the location by clicking the button labeled Change ...
Even though the procedure says it may take several minutes, it finishes quickly.
When the installation of the VisualAge Pacbase system is complete, you will see
another panel that tells you that the system has been installed.
You can defer the installation of the administration database by clicking the
button labeled Later.
Clicking Next will begin the install process for the administration database. Note
that the administration database will only be installed once. This single
administration database is used to manage the VisualAge Pacbase repository,
regardless of how many development databases it contains.
You must also choose the default language for the administration database,
either English (the default) or French, as shown in Figure 4-8.
Note that the default location for the administration database is the same as that
for the VisualAge Pacbase system,
C:\Program Files\IBM\VisualAge Pacbase\
It is not required that the system and the administration database be in the same
location. To change the location, click the button labeled Change ...
The preceding figure shows the panel used to indicate the location of the
following components of the administration database:
Journal directory
Backups directory
Temporary directory
Users directory
Note that the default locations for these are the same as the administration
database,
C:\Program Files\IBM\VisualAge Pacbase\
The backups directory specifies the location of the files that are used for the
backup of the administration database. These backups are sequential images of
the corresponding database and are used to recover the content of the database
in the event of a problem. It is recommended that the backups directory be in a
location distinct from the administration database and the journal directory.
The temporary directory specifies the location of the files that are used for work
areas, sorting, and to contain the reports that result from the use of various batch
procedures (utilities). It should be located on a drive that has sufficient space to
handle the sorting of large files used by the batch procedures.
The users directory specifies the location of the files that are used for the results
of generation from the repository. This directory should be located so that it is
accessible by the users it supports.
If you wish to end the install procedure, click the Finish button. If you wish to
install a development database, click the button labeled Yes. Note that you can
create development databases anytime by using the indicated shortcut in the
Start menu by selecting Programs -> VisualAge Pacbase 3.0 -> Create New
Database.
Many projects and developers will share the same development database.
Indeed, a major advantage of the VisualAge Pacbase repository is that it is a
multi-user environment. As users work in the repository they are working with the
authoritative source of the development components and will see the results of
the work of other developers with each new download to their workspace.
The name of the database refers to the folder that will contain the files used for
the development database. You can use a maximum of eight characters and you
should use a name that has significance. In the example from the preceding
figure, we named our development database REDBOOK.
The listener port number must be a value between 6000 and 9000 and must be
unique from the listener port number assigned to the administration database.
You can use the default value supplied or specify a different value for the listener
port. In our example, we assigned 7030 as the listener port number.
The generation language is also either English (the default) or French. This
controls the language that will be used during the generation of entities from the
VisualAge Pacbase repository. Again, we used English for our example.
After you have completed the specifications for this panel, click Next> to proceed
with the install process. This produces the panel in Figure 4-16.
You can change the location by clicking the Change ... button.
The development database contains several directories for its files. These all
default to the location:
C:\Program Files\IBM\VisualAge Pacbase\
The location for any of these directories can be changed by using the Change...
button and entering a new location.
Note that the default locations for these are the same as the administration
database:
C:\Program Files\IBM\VisualAge Pacbase\
The backups directory specifies the location of the files that are used for the
backup of the development database. These backups are sequential images of
the corresponding database and are used to recovery the content of the
database in the event of a problem. It is recommended that the backups directory
be in a location distinct from the development database and the journal directory.
The temporary directory specifies the location of the files that are used for work
areas, sorting, and to contain the reports that result during the generation of
entities from the development database. It should be located on a drive that has
sufficient space to handle the sorting of any large files that may be used during
generation.
The users directory specifies the location of the files that are used for the results
of generation from the repository. This directory should be located so that it is
accessible by the users it supports.
This will present the panel shown in Figure 4-18, where you will confirm the
installation of the development database.
Panels will display the progress of the installation and when the process
completes you will see Figure 4-19.
Click Finish to exit the installation procedure. This ends the installation of the
software and the creation of the necessary databases for administration and
development activities. Before using the product, you will need to complete the
installation of the Workbenches for VisualAge Pacbase.
In this section we describe how to check that the product installed correctly.
It includes a description of the files created, where they are located, and a brief
description of their use. The examples in this chapter relate to the default
locations for the directories and file locations. If you specified alternate locations,
then you should verify your install based on your specifications. Also, depending
on the VisualAge Pacbase product options you have acquired, your hardware
platform, communications, and operating system environment, your installation
results may vary from the ones in our examples.
The preceding figure shows the system installed in the default directory:
C:\Program Files\IBM\VisualAge Pacbase\
Nls refers to national language support, and this folder contains message files in
both English and French as well as a file to handle character conversion. The
files in the Nls folder are shown Figure 4-21.
Proc refers to batch procedures. These are utilities that accomplish routine
activities such as backing up the database and extracting its content. Figure 4-23
shows a portion of the content of the Proc folder.
Setbases contains the installer and the .cab file used for the install, as seen in
Figure 4-24.
The actual content of the Skel folder varies considerably based on the VisualAge
Pacbase product options installed at a site.
Note in the preceding figure that the Admin folder that contains the directories for
the administration database is itself contained in a folder called Data. All of the
VisualAge Pacbase databases will be placed in the Data folder. The Data folder
basically contains all of the things that you will use directly. These are the files
that will change and grow as information is stored in the VisualAge Pacbase
repository.
Base refers to the files that contain the content of the administration database.
Figure 4-27 shows the content of the Base folder.
Save refers to the files that represent the backup of the administration database.
These files are used to recover the administration database in the event of a
problem. The content of the Save folder is shown in Figure 4-30.
In the preceding figure, many of the files will not be present immediately after the
installation of the administration database. As you complete the installation and
begin to run batch procedures you will see files begin to appear in this folder.
Users refers to the folder that will contain the results of generating entities from
VisualAge Pacbase. Since no generation has been requested at this point in the
installation, this folder will be empty.
Note that the development database resides in a folder that corresponds to the
name specified during the installation process, in this example Redbook. Like all
VisualAge Pacbase databases, the Redbook development database is
positioned within the Data folder. Since the administration (Admin) database was
installed prior to the Redbook development database in our example, we see the
Admin database in the figure.
As you can see in the preceding figure, the folders that result from the installation
of the Redbook development database are similar in name and function to the
ones associated with the administration database and so they will not be
discussed again in this section.
Additional results
The install process adds an entry for VisualAge Pacbase to your Start menu in
Windows NT.
If you select the Create New Database option, the Install SmartGuide begins the
process to install another development database.
4.2.1 Installation
In this section we describe how to run the installation procedure for the
VisualAge Pacbase Workbenches.
The Workbench installation gives you the options of installing the Workbenches
for either all users on the machine or for a specific user. Depending on your
organization’s policies, for example, you may install the administration
Workbench only for users that will function as VisualAge Pacbase administrators.
For the batch and e-business workstations, you may decide to install these for all
users of the machine without specifying a user.
For our redbook example, we installed the Workbench so that anyone using the
machine would be able to access the administration, batch, and e-business
Workbenches.
The panel in the preceding figure is used to indicate the location of the files that
will be installed for the Workbench. The default location is:
C:\Program Files\IBM\VisualAge Pacbase\Workbench\
You can change the location by clicking the Change ... button and specifying a
new path. For our redbook example, we used the default location.
Using this panel, you can specify which Workbench modules you want to install.
Note that you also have the option of installing the Rational Rose Bridge as part
of the e-business module. This feature is discussed more fully in chapter 15 of
this redbook. For our redbook example, we chose to install all of the Workbench
modules and the Rational Rose Bridge.
The next part of the installation procedure requires you to indicate the type of
communication that you will be using, either a gateway or middleware (the
default).
Here, you need to provide the database name and a four-character code for the
database. You can also indicate whether or not the middleware has any security
associated with it.
When you install the Workbench modules in VisualAge Pacbase, you are setting
up connections to the administration and development databases used by your
organization. The installation process allows you to iterate through the
installation process in order to install the Workbench modules for the appropriate
administration and development databases. Click No to proceed with the
installation or click Yes to indicate that you wish to connect another database.
In fact, this screen is very similar to the one displayed if gateway is selected as
the type of communications. One major difference is that the Location name
must be specified and the Edit host ... button is active when middleware is
selected.
The Location name field corresponds to the example names between the < and
>. The series of SmartGuide panels that specify the communications type and
the options associated with either the gateway or middleware are used to create
the basis.ini and vaplocat.ini files which control the connection activity during the
startup of the Workbench modules.
To proceed with the installation, click Next. The installation will proceed by
displaying a panel with a progress bar as it copies the necessary files.
At this point the Workbenches are not actually installed and operational on the
workstation. In order to complete the process you need to click Start ->
Programs -> Workbench and then select each of the Workbenches you want to
make operational for this workstation. The first time you select an Workbench in
this manner, the autoinstaller is activated, which will copy the specific files for
each Workbench module. This is true only for the first time you select the
Workbench module. After that, selecting Start -> Programs -> Workbench and
then selecting an Workbench module will start that Workbench.
If you changed the destination folder, then you will need to verify your installation
accordingly.
Of particular interest in this collection of files are the bases.ini and vaplocat.ini
files, which manage the connection activity during the workstation startup. The
base.ini is basically the logical description of the connection and the vaplocat.ini
corresponds to the physical description of the connection.
Each Workbench operates through a set of tabs that allow you to work with the
entities managed within the VisualAge Pacbase repository. The initial set of tabs
are the result of the Workbench installations.
VisualAge Pacbase includes a facility to add tabs, remove tabs, and change the
order of tabs for any of the Workbenches.
By default, the configuration file manager opens to the options associated with
the developer Workbench. To change to either the administrator Workbench or
e-business Workbench, select File -> Open and navigate to:
..\Workbench\workstation\modules
In order to change the tabs for the Workbench, you will need to open this file.
This will cause an entry for Programs to be added to the list of tabs, as seen in
Figure 4-53.
First, use the File menu from the menu bar, then click the Quick Start ->
Features -> Add Feature. The display changes as shown in Figure 4-55.
As a result of this action, a dialog box appears that allows you to choose the
feature to add to the Workbench. Select the IBM WebSphere Test Environment
feature, as displayed in Figure 4-57.
Clicking the OK button adds the feature to your VisualAge for Java Workbench.
In the Options window, select the Resources choice and edit the workspace
class path as shown in Figure 4-58.
Click OK, Apply, OK, and your workspace is ready for you to use the VisualAge
Pacbase Java classes.
Here, we describe the import process for the generic runtime .jar file. The
process is the same for the other ones.
After that, select this new project, click the Selected menu, and then the Import
menu choice. This opens the Import SmartGuide. Select the .jar file choice, and
click Next.
Clicking the Finish button imports the Java packages into your project, seen in
Figure 4-61.
Follow the same import process for the other .jar files and your workspace is
ready to use. Notice that when importing the swing .jar file, VisualAge for Java
will ask you to modify the graphic palette, useful for visual programming.
Note: When working in the Team mode with a shared repository, this process
only needs to be done once. Team developers would only need to import the
VisualAge Pacbase projects from the repository into their workspaces.
This can be done once after importing the .jar files into VisualAge for Java
projects. Then team members will have to add the created feature just as they
did for the WebSphere Test Environment feature.
For further detail on this process, refer to the VisualAge for Java product
documentation: Toolint.pdf.
For the Java developers, you should create a new directory on their workstations
(for example, D:\RedbookVapb\), which will contain all the middleware files.
For example, using the SOCKET protocol, you would copy the following files in
this new directory:
JavaAdapter.dll
ixomsgen.dll
ixomware.dll
ixosock.dll
MwAdapter.dll
VapUtil.dll
Gateway considerations
For the gateway, you would add the following files in the previously created
directory (D:\RedbookVapb):
Charconv.txt, the code pages conversion file
VapGateway.exe, the gateway program
Double-click the desktop icon for the shortcut to start the VisualAge Pacbase
Workbench.
Selecting that will bring up another list which has each installed Workbench
listed.Selecting either Administration, Batch, or e-business will start the
corresponding Workbench. Figure 4-62 shows the result of selecting
Administration.
The list of databases is a drop-down list that displays the different databases
(administration and development) for your organization. Your organization may
have only one administration database and one development database or your
organization may have one administration database and several development
databases om different platforms. If your organization has multiple VisualAge
Pacbase development databases, then the drop-down list should contain one
entry that allows for site administration and several entries that correspond to the
different VisualAge Pacbase development databases.
After signing on to VisualAge Pacbase, you will see the VisualAge Pacbase
administrator Workbench. The information is presented in the form of a tool bar,
menu bar, and several tabs, each of which is discussed in the following sections.
In this chapter, VisualAge Pacbase administration is described first for site
administration and then for base administration.
File options
When you use the VisualAge Pacbase administrator Workbench, you are using a
local copy (workspace) of the VisualAge Pacbase administration database from
the server. The menu bar file option allows you to do the following regarding this
local copy:
Save workspace locally.
Save workspace as ...
The File option lets you manage your connection to the server as well. Normally,
as the VisualAge Pacbase administrator, you will be connected to the VisualAge
Pacbase repository server. Your changes will be made using a local copy of the
repository which will be synchronized with the server repository. It is possible to
disconnect from the server and work only with your local copy of the repository.
To do this, you would select Disconnect from the File menu. If you need to use
the server copy again (for example, to resynchronize your changes) you would
use the File menu to Reconnect.
VisualAge Pacbase allows you to customize the look and feel of your
administrator Workbench using Preferences from the file menu. The changes
made using Preferences affect this Workbench only, they are not global to
VisualAge Pacbase. A dialog box will appear that identifies the types of
preferences that you can set. These include:
Tab options
The administrator Workbench manages seven things relative to site
administration:
Databases
Command lines
Profiles
Pac/Transfer
Users
Security
Parameters
The second position from the left in the menu bar changes to correspond to the
tab selected. For the tab selected, the menu bar will provide options to:
Create a new occurrence of the entity managed by the selected tab (for
example, in the preceding figure the tab selected manages databases)
Sort the list displayed by the tab in either ascending or descending sequence
based on a property of the displayed information
Menu bar choices are also available in the form of a pop-up context menu by
right-clicking.
The tab display is divided into two parts, selection and definition. The selection
pane displays a list of the user entities being managed and the definition pane
displays the properties for that type of user entity. The Window options allow you
to determine whether either or both panes are displayed.
Security and Parameters are managed through the Window options. You can
open either the Security browser or the Parameters browser.
Security browser
The Security browser consists of three tabs, as shown in Figure 4-66.
You can specify these Password options using the definition tab as well:
The number of old passwords managed
The number of days that a password will be considered valid
The minimum number of characters that the password must contain
Whether the user can specify a blank password
Whether the password must contain numeric characters
Whether the password can be the same as the user id
The tab identified as VA Pac Access Key allows the VisualAge Pacbase
administrator to maintain the key for the product. The key controls which options
are licensed for VisualAge Pacbase and also controls access to the repository.
The key is established when VisualAge Pacbase is installed and is maintained
whenever the organization renews its product license or purchases additional
product options.
Parameters browser
The Parameters Browser consists of three tabs as shown in Figure 4-67.
VisualAge Pacbase allows the administrator to set parameters related to the use
of special characters, error messages, and the categorization of the text
documentation entity. Normally, the special characters feature is not used.
When applications are generated from the VisualAge Pacbase, error handling is
supplied as part of the generated application. Specific error messages are
generated into a file which is then used to retrieve and display the appropriate
error message. The text for these error messages is standard but can be
overridden through the Parameters browser using the Error labels tab.
Figure 4-68 Changing the error message text using the parameters browser
The Text labels tab refers to the entity used in previous versions of VisualAge
Pacbase to produce documentation and assign that documentation to other
entities within the Pacbase repository. This entity is the Text entity and it consists
of a definition and sections (also called paragraphs).
Selected
The Selected option from the menu bar becomes active when an entity is
selected using one of the tabs on the VisualAge Pacbase administrator
Workbench. All of the options pertain to the selected entity and include:
Open, which allows you to see the information for the selected entity
Copy, which allows you to copy a portion of the entity
Duplicate, which allows you to copy the complete entity
Refresh, which updates the displayed information
Discard Changes, which allows you to restore the entity
Delete, which allows you to remove the entity
Save, which commits your changes for the entity
Create, which allows you to create a new occurrence of the entity
Sort, which displays a list of properties for the entity for the purpose of placing
the list of entities for the tab in ascending or descending sequence
Workspace
The Workspace option from the menu bar is used to resynchronize your local
version of the repository with the server repository. This action applies changes
that you have made to the entities in your local repository to the corresponding
entities in the server repository.
Help
The Help option of the VisualAge Pacbase administrator Workbench menu bar
contains the following:
Help Home Page
Workbench Home
Support
About Workbench
The first three options invoke the browser to display related help information for
the VisualAge Pacbase user.
Clicking a database displays the following information in the pane to the right of
the display:
Code: A four-character logical identifier for the database
REST batch procedure: You must use the REST batch procedure to record
this four-character code as reference to a development database
Label: A longer description of the database
Transaction code: The code that allows the TP monitor to manage the
communications for this database
We added the VisualAge Cruise Lines database using the following steps:
1. From the menu bar we selected Create new Base VisualAge Pacbase.
2. In the SmartGuide, we entered “VCL|” for the code and VisualAge Cruise
Lines for the Label. In our Windows NT environment we did not need a
Transaction code.VCL
3. We clicked the Finish button.
You can change the database information using this tab. To change the
information for a database:
1. Select the database from the list in the selection pane.
2. Change the information in the definition pane.
To remove the database from the display, right-click the database and select
Delete from the context menu.
Figure 4-71 shows where command lines can be positioned for entities
generated from VisualAge Pacbase.
Command lines at
beginning of jobstream
Command lines
before entity 1
Source for
entity 1
Command lines
before entity 2
Source for
entity 2
Command lines at
end of jobstream
In the figure, command lines can be inserted before and after each generated
entity (there are two in this example) and before and after the job stream
associated with the generated entities.
We did not require the use of any command lines for the components we
generated for the VisualAge Cruise Lines sample application.
The Admin profile contains users that have the authority to administer our
sample application repository. The steps to add a profile are:
1. Select Create new Profile VisualAge Pacbase from the menu bar.
2. Complete the information presented by the SmartGuide as shown Figure
4-73. Most of this information only applies to users that will be VisualAge
Pacbase administrators.
Profiles (just like users) and their authorizations are common to all databases.
Using the base administration feature of VisualAge Pacbase, they can be refined
for each user on each database and library.
Procedures authorization refers to whether users with this profile can execute
batch procedures. Batch procedures are various utilities that can be used to
manage the VisualAge Pacbase repository and its content. In general, only the
VisualAge Pacbase administrator should have this ability. There are two options:
Not authorized
Authorized
PEI authorization refers to the use of the optional VisualAge Pacbase component
for managing application components generated from the repository and placed
in the production environment. PEI is not within the scope of this redbook.
The VisualAge Pacbase administrator uses these tabs to establish the following
types of Pac/Transfer criteria:
Definition: Corresponds to the earlier definition of the transfer set and can be
used to change the label for this transfer set
Sessions: Used to specify the source session and one or more target
sessions
Libraries: Used to restrict the extraction from the archived journal based on a
specific library and to designate target libraries
Change Numbers: Used if you have DSMS, to restrict the archived journal
transaction based on the DSMS controls
User Codes: Used to restrict the extraction from the archived journal based
on a specific user code and to designate a user code for the target.
You can use the buttons labeled ... to display a list of available sessions to use
as the source and target. The sequence number is used to control the sequence
of the update activity to the target session. For example, when multiple sessions
are specified, you must indicate which session is to be applied first.
You can use the buttons labeled ... to display a list of available libraries to use as
the source and target.
You can use the buttons labeled ... to display a list of available user codes to use
as the source and target.
To add a User, select Create New User from the menu-bar. A SmartGuide
appears that allows you to add the information for a new User.
Clicking a User displays that User’s information and makes it available for
change.
To delete a User, right-click the User and select Delete from the context menu.
These options are also accessible by right-clicking an entry in the displayed list.
Command lines, Profiles, Pac/Transfer, and Users function the same way as for
site administration except that the information is specific to this database
(indicated by the sign on). Security and Parameters open the corresponding
browser and function the same as for site administration.
Libraries
The content of a VisualAge Pacbase database is logically a set of libraries
organized hierarchically. These libraries need to be established and managed by
the VisualAge Pacbase administrator. This is done using a combination of utilities
(called batch procedures) and the VisualAge Pacbase administrator Workbench.
For information regarding the utilities that are available and how to execute them,
refer to the VisualAge Pacbase documentation.
Refer to the VisualAge Pacbase 3.0 documentation for your specific hardware,
communications, and operating system before migrating from a previous release.
The first thing you will see after you start the server is a command window, which
will say:
Checking for new version......
This line means that your Workbench is checking with the VisualAge Pacbase
3.0 server to see if there has been an update to the VisualAge Pacbase software.
If there has been an update, your Workbench will automatically get that update
for you. This does not happen on a stand-alone machine.
5.1.1 Logging on
The process of logging on to either one of the three Workbenches is almost the
same. There are only two things you are not able to do with the Administrators
Workbench log on that you can do with the others. Logging on to a versioned
session, also known as a historical session, and logging on to work under
Development Support Management System (DSMS).
Since this is a tour, we do not want to import or to create anything just now. We
first want to show you around.
1. Click the Go to the Workbench icon.
2. Click OK.
3. Click the tab Data Elements.
What you see now is an empty Workbench. So where are your programs? They
are in the repository together with the data-elements and segments and all the
other things we mentioned before. To be able to take a look at them you would
need to download them first to your local repository. We will come to that later.
The third menu from the right is called Data Elements. This is because you have
selected the tab Data Elements. If you select another tab, for example
Segments, the menu Data Elements will be replaced by a menu called
Segments. The other menu that changes based on the selected tab is the
Selected menu. In addition to the menus on the menu bar there is also a
short-cut to IBM’s VisualAge Pacbase Homepage. Just click the VisualAge logo
on the right of the menu bar to access it.
The three options below allow you to switch between three different screens:
Workbench: Default, this is the screen we are currently exploring.
Workspace Manager: This opens the Workspace Manager. We explain the
working of the Workspace Manager later on in this chapter.
Generation Manager: This opens the Generation Manager. We explain the
working of the Generation Manager later on in this chapter.
Switch to: The different windows you have opened via the Workbench.
By pressing the search button, you will automatically get the Search SmartGuide
for Xref’s, which are cross-references.
By pressing the refresh button you will able to refresh an entity you have selected
from the list on your workbench. Why would you want to refresh? You would
want to refresh because everything you see on your Workbench is stored locally
and it is not locked to you. So when someone else decides to change something
on his machine and saves it in the repository you suddenly have an old version in
your local workspace. To get the latest version you have to refresh.
The discard button will undo your changes on a selected unsaved entity. You
would want to use this if you are not sure of your changes or because someone
else already changed it in the repository.
When you have finished your work on an entity you would like to save it. By using
the save button you will save it in your local repository and on the server
repository. When you create an entity it is automatically saved in the local and on
the server repository.
The buttons placed in between the Import / Create by code button and Show
details button, as shown in Figure 5-13, change per tab and therefore will be
discussed when we discus that tab. These buttons are often the Create buttons.
A blue downward pointing arrow always means import in VisualAge Pacbase 3.0.
It can be found on almost every toolbar there is in VAP 3.0 and it is a part of the
Quick Start window we described earlier. Import in this case means downloading
data from the server repository into the local repository.
The SmartGuide for imports can be divided into to parts, which we did in Figure
5-15. The first part is for importing multiple entities at once. The second part is for
importing specific entities which name is known to you.
The top half of the SmartGuide is only accessible when the radio button in front
of Multiple Import is checked. The result is as follows:
Select: When the preceding radio button is checked you can fill in the amount
of entities you want to download.
– Data Elements from code: This gives the possibility to download entities
from a certain starting point.
Figure 5-16 shows that the lower part of the SmartGuide is only accessible when
the Single import radio button is checked.
This second part of the SmartGuide is to download a single entity whose code is
known to you. The results are as follows:
Code: The code of the entity wanted for import.
Open browser: If this box is checked, the browser belonging to the entity will
open after the import.
This will almost do the same as the lower half of the Import from repository
SmartGuide but with two additional options:
The ability to download more then one entity by its code.
If the entity does not exists, the option to create it.
The default screen of a selected tab displays only the VisualAge Pacbase 3.0
code and the associated label. The show details button will show more specific
details of the entities in your local repository. This details will include in which
session an entity has been created or modified, its library, keywords and some
other details. In Figure 5-19, there is the code, the label, the storage library,
session number and the computed format.
Refresh all
To make sure you have the latest version of a downloaded entity there is the
refresh all button as shown in Figure 5-22. This button will retrieve all the latest
versions of downloaded entities from the server.
Save all
Instead of having to save changed entities one at a time you can save them all at
once by pressing the save all button, seen in Figure 5-24.
5.2.3 Libraries
This tab will show you all the libraries in the server repository. If you select a
library you can see the definition the VisualAge Pacbase administrator has given
to the library.
Using the list box, you select the type of generation you want. If you select one of
the options to generated an application, for instance, Generate Folder, an extra
button will appear between the list box and libraries. By clicking this button you
can select the entity you want to generate.
Save button
This will save the command lines you have entered.
5.3.2 JCL
This tab has no use in our redbook Windows NT-environment. If you work on a
different platform, for example MVS, check the VisualAge Pacbase guide and
your platform guide.
Functions and sub-functions follow one another in the order of their codes, as
determined by the EBCDIC standard collating sequence, with letters preceding
numbers, regardless of the sorting sequence in effect for the hardware being
used. In e-business development you are able to alter the sequence by using
relative positioning.
Here you see the two VisualAge Pacbase functions from Figure 5-30:
Function 60: Where am I living?
Function 65: Dinner
Function 60 deals with where the person is living. Function 65 deals with what
the person is going to eat for dinner. No matter where the person lives on the
globe, that person is going to Pizzeria Grill La Romagnola for pizza tonight.
Functions 60 and 65 are linearly linked to each other, but only in the sense that
function 60 will execute before function 65.
Level numbers are responsible for the level hierarchy. The lowest level number,
05, stands at the top of the level hierarchy. Level 98 has the highest level number
and stands at the absolute bottom of the hierarchy. So when we take a look at
the sub-functions used in the preceding figure, more things should become clear
as follows:.
Sub-function 60BA, at level 10, will be executed if the Country is France.
Sub-function 60BG, at level 15, will only be executed if sub-function 60BA has
been executed and the City is Paris.
Sub-function 60BK, at level 20, will only be executed if sub-functions 60BA
and 60BG have been executed and the CityArea is Louvre.
Sub-function 60BR, at level 15, will only be executed if sub-function 60BA has
been executed and the City is Marseille.
Sub-function 60DA, at level 10, will only be executed if the Country is not
France.
Sub-function 60DG, at level 15, will only be executed if sub-function 60DA
has been executed and the Continent is Europe.
For the sub-function 60DK it does not matter if sub-function 60DG is executed or
not. It stands at the same level as 60DG and its condition will be checked
regardless of whether the condition in 60DG is true or false.
We will now show you how to create elements using VisualAge Pacbase. We will
create three data elements:
An Alphanumeric Data Element called Ship
A Numeric Data Element called Cabins
A Date Element called Inserv
To create a data element, click the Create a Data Element button in the tool bar.
The create a data element button is shown in Figure 5-32.
This action will activate the SmartGuide for creating Data Elements. We start by
creating the data element Ship, proceeding through these steps:
1. In the Code field, type the code of the element, we will use Ship. The length of
the code of a Data Element can vary between one to six characters. For
further restrictions on the code, refer to the on-line help for Data Elements.
2. In the Label field, type a clear name for the Data Element, in our example we
use Name of Ship.
3. Change the Length to 10.
4. Click Finish.
You can see your Data Elements in the Workbench Data Elements window.
Your Workbench will look something like Figure 5-33.
In front of your Data Elements you find a pictogram. Within that pictogram you
see a character. These characters refer to the picture class of the corresponding
element.
Representation tab
This tab is used to specify the element’s appearance in an application. Here you
define different input or output formats. You also can create column and short
labels. There are also fields in which you can specify a default value for the field
and a simulation value.
Value Controls
Value controls are used to assign values to an element. If we were to use Cabins
as an input field we could limit the input to be between two pre-defined values.
We also could say that only specific values are allowed. You create a value by
clicking the Create Value button shown in Figure 5-35.
This will make a SmartGuide pop up. You have to fill in the value field and give it
a label. We used a value of 200. If we now were to create an input application
with VisualAge Pacbase we could ask VisualAge Pacbase to validate the Cabins
input. If it does not contain a value of 200, it will generate an error message.
To create an interval, click the create an interval button (next figure). In the
SmartGuide that appears you can define the interval. There are several intervals
you can use:
(‘A’,‘Z’): This will give you a value range from A until Z including A and Z.
)‘A’,‘Z’(: This will give you a value range between A and Z. But A and Z are
not a part of the range.
Alphanumeric values have to placed between ‘quotes’ if you want to use them as
an interval or a value.
5.5.2 Segments
A Segment entity is made of a structured collection of data elements (elementary
or group). A segment must be coupled to a Data Structure. Each segment,
described only once, can be called into any entity that uses segments (programs,
other segments, or database blocks).
In order to create a Segment we first have to create a Data Structure. The data
structure create button is shown in Figure 5-36.
Now you have created a Data Structure, which can contain several segments.
Segment window
You have now created a segment definition called TE01. At this point, the
segment does not contain any elements. These are the steps to take to populate
the segment so that it becomes a collection of data elements:
1. Double-click your segment. The Segment window pops up.
2. Select the Composition tab.
– Click the Call one or more Data Elements button as shown in Figure
5-38. A window with the Label “Choose Data Elements to call” pops up as
shown in Figure 5-39. In this window you see the three Data Elements you
have created.
3. Select all three Data Elements. You can do this in any of the following ways:
– Select an element and click OK. Repeat this until you have all three Data
Elements.
– Hold down the Ctrl-key while selecting the Data Elements you want with
the mouse pointer. When you have all the elements you want release the
Ctrl-key and click OK.
– Select either the data element on top or the one at the bottom and then
press the Shift-key and select the opposite one and click OK.
Composition tab
You have now populated your Segment with Data Elements. These Data
Elements, however, may not be in the right order. Perhaps you want the Data
Element Inserv to be on top of the list. To rearrange the composition of your
Segment you can use the Up and Down buttons on the tool bar. This is what our
Segment looks like after we re-arrange it:
Ship
Inserv
Cabins
On the tool bar you have numerous buttons to alter your composition. These
buttons are outlined in Table 5-1.
Call one or more table elements Populates your table with one or more
elements
5.5.3 Programs
The reason we have added the Programs tab to the e-business Workbench is
that we need it to build a parameterized macro structure (PMS or macro). The
purpose of a macro is to standardize sequences of procedural, with possible
variations, in order to use them:
One or more times in one program
In several different programs
Structured code
The macro we are going to build has only one goal. The macro is going to display
which elementary component has been started on our Listener.
The structured code screen is separated into nine columns, each with its own
specific function, seen in Figure 5-40.
Operators
VisualAge Pacbase uses a number of operators to manipulate data. Operators
are entered in the Operators column abbreviated as O.... on the programming
bar. Table 5-2 will explain twelve of the most commonly used operators in
VisualAge Pacbase.
Condition types
Condition types are entered in the C... column. This column is used for two
reasons. The first one is for relative positioning and the second one for
programming conditions.
The condition type for relative positioning must always be followed by a condition
line. On this condition line you have to define where you want your code to be
placed. In your code these condition types are abbreviated. They start with an
asterisk (*) and are followed by the first character of the name. Table 5-4 shows
examples of condition types and lines with explanations.
Creating a macro
When you select the Programs tab, you will find two yellow buttons. The one we
need is the one with the dollar sign in it, seen in Figure 5-41.
After clicking this button, you have to fill in two fields on the SmartGuide that
appears:
Code: We used MarkII
Label: We used Begin Server Message
Parameters
A parameterized macro structure (PMS) uses parameters of course. These
parameters are identified by a dollar sign ($) followed by a character. A macro
structure in VisualAge Pacbase can contain twenty parameters. These twenty
parameters range from $1 to $0 and from $A to $J.
In our macro we are going to use only one parameter. This parameter is going to
contain the name of the elementary component. Here is what needs to be done:
Source tab
The source tab is the place to put the structured code for a PMS. By clicking the
Create a function/sub-function button in Figure 5-42, we can create one.
For creating the function, we filled in the following fields in the SmartGuide:
Function: We used 01.
Title: We used Display Messages.
For creating the sub-function, we filled in the following fields in the SmartGuide:
Function: We used 01.
Subfunction: We used BB.
Level: We used 10.
Title: We used Message Display.
Condition: We used Complete.
Condition line: We used BS A.
We show you the logical view tab and the rest of the e-business Workbench by
using one of the proxies for our sample application.
Definition tab
Here you will find the definition you produced with the SmartGuide.
Composition tab
The Composition tab is labeled with a question mark. Here we populate our
logical view in almost the same manner as we populated the segment TE01. We
add elements to the logical view by creating a composition line. We populated
our logical view with the following elements:
Portid: Port identifier.
Portnm: Port name.
Ctrynm: Country in which the port is located.
Note: Extract methods should be used only for simple requests on the
database, otherwise methods should be written in the elementary components
that support more complex code. Extract methods are interesting only if they
do not concern the table keys, since such accesses are dealt with by the
elementary components. Sort methods would only be used to sort the results
of the extract method defined.
We have now created the definition for one elementary component called
Destination. When we double-click our creation the elementary components
browser pops up.
Definition tab
In the definition tab, you can change the fields which make up your definition
except for two fields. These are:
The Code field
The Short code field
Composition tab
In an elementary component we will call persistency objects. A persistent object
is described by a collection of data elements that defines its internal structure. A
persistency object is a component that manages persistency on the following
physical data storage systems.
Another elementary component, which manages access to data contained in
a logical view.
A table or a relational database.
A DL1 database record.
A mono or multi-structure file.
A working area.
A Pactable table, optional VisualAge Pacbase 3.0 module.
In the SmartGuide you have to name your relational database. We used the
name Cruise.
Now that we have indicated what kind of persistency object we will be using we
need to tell VisualAge Pacbase which persistency object we will be using. We do
this by clicking the Add persistency object button, shown in Figure 5-47,on the
tool bar.
Our definition window now looks like the one in Figure 5-48.
The relationship between a logical view and persistency object is based on the
processing, triggered by a server call, of a collection of N instances of the logical
view, N being the number of instances that navigate between client and server at
once and being limited by the iterative capacity of the logical view. We create this
relationship in the central right window.
In order to activate this window, we select the logical view call from the List of
managed LV window. We can drag and drop the persistency object, which we
have defined in the Definition window on the right, into this window. We select
the type of access we need to our persistency object from the list box located
directly under the title bar. We selected Standard Update. Our window now looks
like Figure 5-50.
To fill the key fields in the dataElements Transfer window we need to select the
TB01 from the PO cinemtics window. Now we can Add the key field. The
dataElements transfer identifier and transfer field are listed in Table 5-7 and Table
5-8.
Portid Portid
Portnm Portnm
Ctrynm Ctrynm
Procedural code
The first thing you will see when you enter this window is all the logic VisualAge
Pacbase has generated so far. This is more than sufficient to run your program.
But there could always be some sort of reason that you would want to place
specific code into the program. If you do want to add your own logic be very
careful were you place it. Also think very carefully were you want to place it. Not
every piece of code will be executed all the time. Figure 5-51 gives you a global
idea what each elementary component does in the logic.
When you now go back to the procedural code tab you will see that your macro
code has been placed there. Notice also that the code of your macro is indicated
by the color green.
The working file may be stored as a DB2 table, but for performance reasons we
recommend using an indexed file. This working file must also be defined in
VisualAge Pacbase as follows:
1. We created a data structure CR with the label Working File Structure.
2. The second step was to create a segment CR00 called Common Part.
3. We filled this segment with two data elements.
– KEYWF, alphanumeric 37 positions, labeled Key of the Working File.
– DETAIL, alphanumeric 250 positions, labeled Content of the Working File
Clicking this button activates the creation SmartGuide. Here we fill in the
following fields:
Code: CruiseApplication.
Label: Cruise Application.
Short Code: Cruise.
Associated Package: com.cruise.cruiseline.proxies. This is the name of the
Java package that will be created when generating the proxy.
Working file: CR00.
File Type: File.
Working file logical name: WF00.
Click Finish.
e-definition tab
By using the SmartGuide we have filled in all the things we needed on our
definition screen.
e-error Server
Here we give our error server its generation details. We call the error segment
we created before.
Generation
Our server will be a COBOL program compiled with the VisualAge for COBOL
compiler. Here we define the COBOL program ID and the Type of code to
generate:
COBOL program ID: SERVERR
Type of code to generate: VisualAge COBOL.
The other four tabs of the Error Labels File are not needed in our redbook
sample application.
e-database
Here we define the database our application is using. For performance reasons it
is better if it is also local to the servers:
Connection database block code: CRUISE
Connection database location: Local
5.5.7 Folders
A folder groups a set of services nodes: thus it is a complex information concept
built from a set of elementary information concepts linked through hierarchical or
reference relationships. It supports a set of consistent services required to
accomplish user tasks and also manages data consistency.
Creating a folder
We create a folder by first establishing its definition, using the button in Figure
5-53.
In the window that appears we will give our root node a name for our folder
nodes hierarchy. We select the logical view and the elementary component we
want to use. To be able to generate our folder later we must give generation
codes and classes. A proxy node is generated into three Java classes:
HierarchicalNode
DataDescription
SelectionCriteria
We not only created the definition, but also the root node of our folder, which is
shown in the composition tab. There is however one very important thing missing
here. That is the Node identifying. The node identifier is the key field to the
Re-using existing application components provides more reliable code, since the
component has already been proven to work properly in the production
environment. A calculation, for example, may need to be performed as a precise
set of operations. Writing the code for this calculation once and then re-using that
code assures that the operations will be performed correctly.
VisualAge Pacbase includes standard entities for many of the data and
processing needs of most applications while other entities exist to support the
production of documentation from the VisualAge repository. In addition, you can
define entities in the VisualAge Pacbase repository to meet the specific needs of
your organization. These are referred to as meta-entities (formerly called
user-entities in previous releases of VisualAge Pacbase) and are not in the
scope of this redbook.
Data considerations
Data entities are re-used frequently across the application components within the
VisualAge Pacbase repository. In this sense, the VisualAge Pacbase repository
functions as a data dictionary and serves as the authoritative source of
information about the organization’s data model. For this reason, the data entities
are positioned at a high level within the VisualAge Pacbase library hierarchy.
Documentation considerations
Documentation that describes your organization’s standards for the use of the
VisualAge Pacbase repository is normally positioned at a higher level library so
that it can be read by all users of the repository. Often, templates are placed in a
higher level library to demonstrate the use of your organization’s standards for
each type of entity.
Processing considerations
VisualAge Pacbase processing entities are re-used to a lesser extent than data
entities. Of particular note, however, is the concept of parameterized macro
structures, referred to simply as “macros”. Macros are re-usable code fragments
that are called into other processing entities to produce code or to supplement
the code of the programmer.
Macros are positioned at a higher level within the VisualAge Pacbase repository
to maximize their reusability. Since macros manipulate data entities, they are
positioned subordinate to the data entities in the repository.
6.1.3 Libraries
Libraries in the repository are used to position entities for reuse across the
applications developed with VisualAge Pacbase and also serve to limit access to
the entities which they contain. For example, it is ill-advised to allow everyone in
your organization to modify the data entities that represent the data model for
your organization. Normally, only staff members responsible for data
administration would have this responsibility.
The VisualAge Pacbase administrator establishes the library access for each
VisualAge Pacbase user (read-only or update, for example). Libraries are entities
in the VisualAge Pacbase repository managed by the VisualAge Pacbase
administrator. Each library is identified by a three character code chosen by your
organization and each library has a label that is used to describe its content or
theme. Libraries within the VisualAge Pacbase repository can be thought of as
consisting of two layers, an administrative layer and a development layer. Figure
6-1 shows the typical structure of the administrative layer of the VisualAge
Pacbase library hierarchy.
STD
Administrative
MAC
Development
SY1 SY2
AP1 AP2
VR1 VR2
The highest level library (DTA) is controlled by the data administration staff and
contains the data entities such as data elements, data structures, segments, and
database blocks.
Below the DTA library is the library (STD) used for entities that describe the
organizations standards.
Below the STD library is the library (MAC) used to manage the macros (reusable
code fragments) that are of interest to the entire organization.
Figure 6-2 shows the development layer positioned below the administrative
layer in the VisualAge Pacbase repository.
STD
Administrative
MAC
Development
SY1 SY2
AP1 AP2
VR1 VR2
The MAC library in the preceding figure is the same library in the figure for the
administrative layer. The MAC library, which contains the macros for the
organization, can be considered to be part of both the administrative layer and
the development layer.
Below the MAC library, the content of the VisualAge Pacbase repository can be
organized based on major systems within your organization (SY1 and SY2 in the
figure). An example of a major system might be Finance.
A major system can be organized into libraries for its applications which will
contain the corresponding entities in VisualAge Pacbase used to generate the
application components (shown by AP1 and AP2 in the figure). Extending our
Finance example, AP1 and AP2 might be PAYROLL and GENERAL LEDGER.
Data elements are used throughout your code in calculations, data manipulation,
and to store values.
The database block entity provides VisualAge Pacbase with the ability to
generate DDL (data definition language) and establishes the VisualAge Pacbase
repository as the authoritative source of information about your organization’s
databases. VisualAge Pacbase becomes a tool for the data base administration
staff to manage the DDL.
The database block entities are usually positioned with the other data entities at
a high level in the VisualAge Pacbase library hierarchy.
6.3.1 Descriptions
Descriptive detail can be developed with your choice of word processor and then
related to entities within VisualAge Pacbase. This provides the advantage of
being able to write one description and to associate it with several related
entities.
For example, you may decide to create a new entity called Project. You could
create an occurrence of the Project entity called Redbook and capture attributes
about the Project such as its beginning date, expected completion, and manager.
You could then relate this Project entity to such standard entities as data
structures, segments, programs, and reports that are created as part of the
project.
Descriptive entities exist at all library levels within the VisualAge Pacbase
repository. Relative to reusability, these entities need to be positioned at a library
level within the hierarchy that will make them visible and accessible to
developers in lower libraries that desire to use these as part of their application.
The parameterized input aid is an entity managed within the VisualAge Pacbase
repository used to structure the entry and presentation of the information for
general documentation of other entities. Parameterized input aids are often
related to an organization’s standards and are positioned as entities in the higher
level library that contains information related to standards and the use of the
VisualAge Pacbase repository.
A folder is used to group nodes and serves as the basis for generating the
VisualAge Pacbase proxy.
The e-business entities are located at the lower library levels within the
VisualAge Pacbase repository in an application library.
The batch program entity is also used to define macros (reusable code
fragments). When a batch program entity is used in this manner, it does not
contain any descriptions of input or output files or databases.
Batch program entities that are macros are located in the VisualAge Pacbase
repository based on whether they are or interest to the entire organization or
specific to a major system or one of its applications:
If the macro is of interest to the entire organization it is positioned at the
higher library that contains such macros (MAC in our example).
If the macro is of interest to all of the applications for a major system it is
positioned at a lower level library that will allow it to be used by all of the
applications for that major system (SY1 or SY2 in our example).
If the macro is of interest only to the components of a specific application,
then it is positioned at the lower level library that contains the components for
that application within the VisualAge Pacbase repository (AP1 or AP2 in our
example).
Batch program entities that represent macros must be identified with a code that
precedes the name of the batch program that uses the macro. For this reason
many organizations establish a standard that requires the code for the macro to
begin with the letter “A” or a special character.
6.4.3 Reports
The report entity in VisualAge Pacbase describes the layout of the report, how
the information on the report is formatted, and also the conditions for printing the
different sections of the report such as the headings, detail lines, and totals. The
report entity is used by calling it into a batch program entity. The report entity can
be defined once and used in several batch program entities. During generation of
the batch program entity, the report entity is taken into account and the code
necessary to manage the report is placed into the source code for the batch
program entity.
Report entities are located at the lower library levels within the VisualAge
Pacbase repository in an application library that corresponds to the batch
program entities that use the report.
STD
SY1 MAC
AP1 SY2
VR2
You can change the library view option to see different views of the library
hierarchy relative to your position.
The extraction of entities from one VisualAge Pacbase repository for placement
into another VisualAge Pacbase repository is accomplished by the execution of
utilities that are part of the VisualAge Pacbase product. The extraction utilities
produce flat files that can be used with the update utility to place the entities in a
different repository.
The design and structure of VisualAge Pacbase also makes it possible to easily
move a VisualAge Pacbase repository from one platform to another (for example
from MVS to UNIX).
Consult the VisualAge Pacbase documentation for a full discussion of the various
utilities available for managing the VisualAge Pacbase repository.
We introduce both the forward and the backward development paths before
presenting the main steps of the forward development path.
Construction: server-side
Forward development continues with the steps for the server-side
implementation of business services and data access and includes:
4. Setting a technical frame, the e-business application
5. Building a services node, the Logical View / Elementary Component pair
6. Building a services system, the Folder
Construction: refinement
9. Refining the presentation and navigation
Using the UML modeling approach works extremely well with the analysis and
design of a VisualAge Pacbase application. This can be seen in the following
approach, which is highly recommended:
Some of the main workflows constituting the UML process are strongly
recommended when designing a VisualAge Pacbase application:
1. Describing requirements
Understanding the system context
Identifying the use cases and the mechanisms involved in user activities
2. Expanding the analysis
– Definition of modular sub-parts of the system, based on functional criteria
using the various behavior diagrams such as the activity diagram and
interaction diagrams
– Internal description of the uses cases with the use case diagram
– Introduction of Business Objects using the class diagram
3. Designing the system
– Deploying the packages into design subsystems with the component
diagram
– Distributing the analysis Use Case Realizations into design subsystems
and refining the associated diagrams
One of the core structuring concepts of VisualAge Pacbase is the Folder. The
Folder is a good example of how UML and VisualAge Pacbase concepts
complement each other:
The Logical View represents data for which services (for example, read and
update) are required. It contains a structured list of data elements that forms the
message to be exchanged between the client and the server.
A Logical View must be independent: it must contain all data that it needs to
establish the message between the client and the server without the need to
access any other source.
In general, we can say that the Logical View organizes the data and the
Elementary Component organizes the services for this data. This Logical View /
Elementary Component pair is known as a Node.
Even though the technical context can be shared, our design recommendation is
to have one VisualAge e-business application per deployed business application.
7.4.4 Results
After completing the construction of the server-side components, the servers and
proxies must be generated from VisualAge Pacbase.
Note: The term proxy will be explained in detail in chapter 9 which describes
the VisualAge Pacbase Proxy. Testing will be described in greater detail in
chapter 13, Testing and Deployment.
As a result, this VisualAge Pacbase proxy is the main component of our client
model layer (refer to Chapter 2, Targeted Application Architecture). Using the
Proxy concept, services are structured as follows:
We create some Business Objects through inheritance from the proxies.
We use the Command pattern to encapsulate the access to services.
In Part 2 of this redbook, we use this approach for the VisualAge Cruise Lines
sample application.
For this redbook, we used WebSphere Studio to design and develop our HTML
pages and JSPs. The JavaBeans we needed to provide dynamic content for the
JSPs were developed and imported from VisualAge for Java.
Specifically, WebSphere Studio generates a servlet for each JSP along with the
following services:
doPost(), doGet() methods to retrieve the URL content
getRequestParameters() method to retrieve each field value and user action
These servlets are imported into VisualAge for Java where the navigation is then
fully developed. The navigation development team must decide between:
Generating a servlet for each JSP, or
Using one servlet to manage several JSPs
This too will be shown in the VisualAge Cruise Lines sample application in Part 2
of this redbook.
7.5.4 Testing
VisualAge for Java provides three integrated tools to test the client-side
application:
The VisualAge for Java Debugger provides facilities to debug Java code.
The WebSphere Test Environment simulates a Web Server within VisualAge
for Java.It provides access to the Java Debugger for JavaBeans and Servlets
running in the simulated servlet engine.
The JSP execution monitor provides facilities to review JSP compilation and
execution.
Additional information regarding testing can be found in the chapter 13, Testing
and Deployment including the use of the VisualAge Pacbase Test Tool.
Database
Command Beans
Servlet
Functional
Subsystem
Navigation Commands
HTML,
JSP,... Elementary Database
components,
Servlets Beans folder, ...
7.7.1 Deployment
Figure 7-3 describes how the e-business application components are deployed.
Web browser
(no deployment)
WebSphere VisualAge Pacbase
Application Server business application
Database
Servlet
Elementary
HTML, Proxy components,
JSP folder, ...
JavaBeans
Database
A logical view has an iterative capacity. This capacity is the maximum number of
instances that can be processed by an elementary component in one execution.
A logical view must have a key made of identifying data element(s).
User service
A User Service is a consistent processing unit executed based on the Client’s
request. For each Logical View called in a Business Component, the developer
can define custom processing using an insert point reserved for that purpose.
Coding follows the standard rules of the VisualAge Pacbase structured code.
Logical lock
A logical lock allows - upon the Client’s request - to limit the update of a coherent
set of data to one user.
8.5 Folder
A folder, or services system, groups a set of services nodes. A complete services
node corresponds to a pair of two types of components, a logical view and an
A query targets one and only one Services Manager and includes 1 to n service
requests. The Service Manager processes a query:
By interpreting the contents of the service into 1 or n elementary requests
addressed to the corresponding elementary components.
A service is processed by an elementary component which can, in turn, call
another elementary component.
By transmitting whenever relevant the corresponding user buffer to the called
elementary component and by updating its contents after the call from the
elementary component if the user buffer has been sent by the client.
There are as many Services Managers as there are Folders specified for the
application. The Services Manager is a purely technical component, in which it is
not recommended to insert specific code.
The generation of a Folder view creates (in the Client component) an object
called Folder view proxy which allows a VisualAge Pacbase GUI application to
read, modify and transform the Folder’s instances.
Working file
The working file is a technical file that is used by the communication monitor to
temporarily store the information which is necessary to build the request or its
response when several messages are required.
The working file could be stored using any type of file access method (for
example, a DB2 table) but for performance reasons we recommend using an
indexed file.
This working file also needs to be defined in VisualAge Pacbase in order for the
components to know its logical name and structure.
The error server allows to manage application specific errors, to be sent back to
the client whenever an error is detected. The activation of the error management
is to be specified on the e-business application component.
We use a database to store our messages. The file must be defined as follows:
Erkey, a 29-character long alphanumeric key field.
Label, a 71-character long alphanumeric field.
Communication monitor
After building the e-business application it is possible to build components like
the communication monitor:
1. Like most VisualAge Pacbase definitions, the Code, Label, Short Code, Cobol
program ID and Type of Cobol to generate must be filled in.
Logical view
The logical view creation is the next logical step to take in the process of creating
a complete VisualAge Pacbase 3.0 e-business application:
1. A logical view is first defined by a long identifier, a label and a short code.
These fields are all mandatory.
2. The logical view composition, in terms of data elements, should be given.
Adding a data element in the logical view is called adding a composition line,
since we give more information than just the data element name.
A data element may also be defined as a set of data elements, thus establishing
hierarchies of data elements, which are called data element groups.
Extract method
Extract methods are used when the selection is a conditional one relative to the
logical view:
1. The extract method is first created by giving it a code and a class code. The
class code will appear in the proxy to be used on a selection action.
2. Add extract parameters to the extract method:
– Extract parameters are data elements which are used to express the
conditions of the method. They are chosen from among the data elements
in the repository, but the same element cannot be called twice in the same
method.
3. Describe the conditions of the extract method. This is done by writing the
condition on the extract parameter with help of the code editor.
4. Add sort criteria if required. It is possible to have sort criteria and no
conditions. The data element on which the sort is based should belong to the
logical view. At runtime, the sort is done after the selection of instances.
Note: Extract methods should only be used for simple requests on the
database, otherwise methods should be written in the elementary components
that support more complex code. Extract methods are of interest only if they
do not involve the table keys, since these accesses are dealt with by the
elementary components. Sort methods are used to sort the results of the
extract method defined.
Nodes
Access the composition tab of the folder and add the dependant and reference
nodes of your folder. Each new node is created, departing from another node.
For each node, select the logical view that supports the required data.
Elementary component
The application that will be used for generating the elementary component will be
the folder application to which the elementary component will be linked:
The elementary component must be defined with a long code, a label and a
short code.
At this stage we define only hierarchical components.
The target generation language should also be given.
Creating nodes
In an elementary component, we will call persistency object a component that
represents one of the following physical storage systems:
Another elementary component, which manages access to data contained in
a logical view.
A table or a relational database.
A DL1 database record.
A mono or multi-structure file
A Pactable table
To add a logical view to our composition we work with the top right window:
1. Create a new composition line. This needs a generation code, an identifier in
the elementary component. This must be mapped to an existing logical view
and the view should be given an iterative capacity.
There are two standard types of relationships between the logical view and a
persistency object. Both describe the dynamics of use of the persistency objects
when a set of the logical view instances is selected or updated. The first type
corresponds to a logical view instance that owns information which is only
displayed and comes from a persistency object that never will be impacted by an
update. The second type corresponds to the update process management.
Persistency objects may also be used in a specific way to modify the standard
selection or update processes. In that case, the functions for logical and physical
accesses are generated and the call of the logical functions is managed by the
developer.
Only one type of access is allowed for a persistency object with the update
dynamics:
Existence
Existence and selection
Update
Update and selection, only when calling another elementary component
Specific service, only when calling another elementary component
Selection
When the dynamics are of type specific on a given persistency object, several
access types are possible but from the following four you can choose only one:
Existence
Existence and selection
Update
Update and selection
When an exception is sent when accessing a persistency object, all the accesses
that are conditioned by the current access are cancelled for the current logical
view instance.
The logical view data elements that appear in this step are come from the fields
entered when creating the logical view plus the fields defined as keys when
calling the logical view in the folder.
There are certain rules by which we must determine our data transfer:
The key transfer depends on the type of dynamics chosen:
– If the dynamics are “selection”, the keys of the main persistency objects
can only be fed from the logical view keys. The keys of the secondary
persistency objects can be fed from the data elements of the logical view
which are neither extract parameters nor elements of a previously read
persistency object.
– If the dynamics is “update” or “specific” and the access type is “selection”,
“existence and selection”, or “existence only“, the keys of the main
persistency objects can only be fed by data elements of the logical view
which are not extract parameters. The secondary persistency objects can
be fed by data elements of the logical view which are not extract
parameters nor elements of a previously read persistency object.
– If the dynamics are “update” or “specific” and the access type is “update”
or “update and selection” the keys of the main or secondary objects can
only be fed by data elements which are identifiers in the logical view. If the
access type is service specific, for the call of an elementary component,
there is no possible transfer.
The transfer of non-identifier data elements (fields) allows you to specify for
each data element (which is not an identifier in a persistency object) the data
element which it feeds (or that feeds it respectively), in the selection, update
or specific dynamics:
– If the dynamics are of type “selection”, the non-identifying data elements
of the main and secondary persistency objects can only feed
non-identifying data-elements of the logical view.
– If the dynamics are of type “update” or “specific” and the access type is
“selection”, “existence and selection”, or “existence only”, no transfer is
possible.
The data transfer is defined in the right bottom window of the composition tab.
1. If there is more than one, select each of the previously defined relationships
between the logical view and the persistency objects.
2. Select the key transfer view.
3. For each one, list the keys of the logical view and, in the target column, their
counterpart in the persistency object. This defines the transfer between the
two types of components.
4. Change the view selection from key transfer to field transfer.
5. Here, in the same way as in step 3, define the transfer of non-identifier fields
between the logical view and the persistency object.
Using the e-business development workstation, the folder and its hierarchy of
elementary components must be generated from the VisualAge Pacbase
repository. This results in an output file that is used with the VisualAge Pacbase
Java generator to produce the Java classes for the client.
The objects generated from the VisualAge Pacbase repository, shown in Figure
9-1, are the following:
Folder proxy
Elementary proxies (these are always associated with a folder proxy).
Nodes
Elementary Proxy
Elementary Component/Logical View
...
Generator Import
VisualAge Pacbase
Description File Java File
Input Java Generator Output
9.2.1 Overview
The folder proxy is used by your client application to manage the functional
interactions (for example, between dependent nodes) of the elementary proxy
objects it contains.
The root proxy is an elementary proxy which has its own specific characteristics.
Only the root proxy can execute server update actions and ensure error handling.
The fact that the root proxy handles all of the update activities allows developers
to take advantage of services such as commit/rollback.
Elementary proxy objects are used to execute the public services of the
elementary component associated with them. The elementary component proxy
enables the client application to send requests for services to the remote server
associated with the elementary component proxy.
The following sections and chapters describe how to use a proxy in the client
environment.
Hierarchy overview
Figure 9-2 shows the Java generic proxy classes hierarchy.
ProxyLv
This class is the abstract root class of all generated proxy classes.
HierarchicalProxyLv
This class is the abstract parent class of dependent proxies and folders. It
provides the facility for managing proxy hierarchies.
Folder
This class is the abstract parent class of generated folders.
ReferenceProxyLv
This class is the abstract parent class of generated reference proxies.
For instance, if we generate a proxy class called ShipProxy that extends the
Folder class, the following related classes will be generated as shown in Table
9-1.
getXxx() (for example, getCabinProxy()) Returns the xxx property value, where
xxx is the name of one of the dependent
proxies.
The following methods are generated only for proxies that have at least one
dependent proxy:
checkExistenceOfDependentInstances()
readAllChildren(aData)
readAllChildrenFromCurrentInstance()
readFirstChildren(aData)
readFirstChildrenFromCurrentInstance()
readFirstChildrenFromCurrentInstance()
readInstanceWithAllChildren()
readInstanceWithFirstChildren()
The following methods are generated only if at least one extract method has
been inserted in the logical view server associated to the proxy:
setExtractMethodCode(String)
getExtractMethodCodes()
the local cache associated with the proxy is reset and will contain the instances
returned. This is true except in the case where the proxy ManualCollectionReset
attribute is set to ‘true’. When the proxy ManualCollectionReset attribute is set to
‘true’, the client is responsible for managing the cache associated with the proxy.
This is not recommended.
R o o tP r o x y ro o t p ro x y
F ir s tD e p P r o x y fis r t le v e l d e p e n d e n t p r o x y
S e c o n d D e p P ro x y s e c o n d le v
We retrieve the detail information for one of these instances by calling the
getDetailFromDataDescription method, which places the retrieved information in
the detail property of the proxy. All of this is shown in Figure 9-4.
selectInstances() getDetailFromDataDescription(rootA)
Then we retrieve dependent instances for this root instance by calling the
readFirstChildrenFromCurrentInstance() method. In this way, node by node, we
retrieve all of the dependent instances as shown in Figure 9-5.
RootProxy RootProxy
Rows: list Rows: list
Detail: rootA Detail: rootA
FirstDepProxy FirstDepProxy
Rows: empty Rows: childrenForRootA
Detail: empty Detail: empty
SecondDepProxy SecondDepProxy
Rows: empty Rows: empty
Detail: empty Detail: empty
Actually, we iterate through the root nodes, and for each root instance, we
retrieve all of its dependent instances as shown in Figure 9-6.
readNextPage()
RootProxy RootProxy
Rows: list Rows: list
Detail: rootA Detail: rootA
FirstDepProxy FirstDepProxy
Rows: empty Rows: childrenForRootA
Detail: empty Detail: empty
SecondDepProxy SecondDepProxy
Rows: empty Rows: empty
Detail: empty Detail: empty
readAllChildrenFromCurrentInstance() getDetailFromDataDescription(rootA)
Notice that all dependent instances of second level are in the local cache. They
are then placed in the SecondDepProxy rows property when the FirstDepProxy
detail property changes.
For more details and issues about useful design patterns and the command
framework, refer to Servlet/JSP/EJB Design and Implementation Guide,
SG24-5754.
Introduction
Often it is necessary to create a single instance of a given class for technical or
business reasons. You may define a utility class of which at most one instance
can exist per Java Virtual Machine (JVM). For example, to manage a log for your
e-business application.
The purpose of the Singleton pattern is to provide global access and to insure
that only one instance of the class is created during runtime. To do this a private
static variable is used to maintain the sole instance of the Singleton class. A
private static get method is used to access this private static variable. The first
time the variable is accessed it is instantiated.
Finally, all of the services from the Singleton class will be public static services
using the Singleton instance accessor to call private instance services.
//constructor
private Singleton() {
// ...
}
In this redbook, we use the factory pattern based on the Singleton pattern. This
is done because we want to ensure that the factory is the only instance provider.
//constructor
private Factory() {
// ...
}
The execute() method executes the task encapsulated by the command. This
moves the command from the initialized to the executed state.
The reset() method resets the output properties to the values they had prior to
calling the execute method, so that the get methods no longer work and the
isReadyToCallExecute() returns true. This provides a convenient and efficient
way to reuse the same command instance with changes in some of the input
properties.
setXxx getXxx
10.2.2 CommandException
The CommandException class is a concrete class that inherits from
Java.lang.Exception.
public CommandException() {
public CommandException(String s) {
super(s);
}
10.2.3 CommandFactory
The CommandFactory class is based on the factory pattern. It hides the
mechanism of procuring a command, given the class name of the desired
instance.
A command may require some input properties. Because the command class
should be a JavaBean, we recommended that the command follow the standard
JavaBean naming guidelines. This means that the input parameters are
JavaBean input properties and should have a signature like:
public void setXxx (Xxx xxx)
The Business object framework captures these basic concepts and provides an
extendable infrastructure.
10.3.2 BusinessObjectFactory
The BusinessObjectFactory class is based on the factory pattern. It hides the
mechanism of procuring a business object, given the class name of the desired
instance.
A folder proxy needs information about how to locate the VisualAge Pacbase
middleware. We can specify either the locations file path (when using local
middleware) or the gateway host and port (when using a local or remote
gateway). To do that, we define constants in the BusinessObjectFactory class as
follows:
/default is to use local middleware
private final static boolean cvUsingGateway = false;
The constants for the file name, IP address, and port could be externalized into a
Java properties file and this is highly recommended.
It is good practice to use these constants during instantiation to centralize the set
up of such communication parameters. An example follows:
private BusinessObject createNewInstance(String
businessObjectClassName) throws Exception {
Class c = Class.forName(businessObjectClassName);
BusinessObject bo = (BusinessObject) c.newInstance(); //casting
if (bo instanceof Folder) {
if (cvUsingGateway) {
initializeForGateway((Folder) bo);
} else {
initializeForLocationsFile((Folder) bo);
}
}
return bo;
}
Instantiation Instantiation
Request for
Service
XCommand XBusinessObject
O.. O..
Implements Implements
This chapter begins with a brief introduction to JSPs, and how they interact with
the application server. Later in the chapter, we discuss main JSP syntax
elements, and we provide details on how to create presentation logic using JSPs
in the VisualAge Pacbase context.
Throughout this redbook, we use the JSP 1.0 specification; however, WebSphere
Application Server 3.02 and VisualAge for Java 3.02 support both JSP 1.0 and
JSP 0.91 specifications.
In addition to reading this chapter, you may also want to refer to Servlet and JSP
Programming with IBM WebSphere Studio and VisualAge for Java, SG24-5755
for much more detail on JSP specification, JSP tags syntax, and JSP use.
Note: WebSphere Application Server 3.5x and VisualAge for Java 3.5x will
support both JSP 1.1 and JSP 1.0 specifications.
JSPs are made operable by having their contents (HTML tags, JSP tags and
scripts) translated into a servlet by the application server. This process is
responsible for translating both the dynamic and static elements declared within
the JSP file into Java servlet code that delivers the translated contents through
the Web server output stream to the browser.
The following process outlines the tasks performed on a JSP file for the first
invocation of the file (or when the underlying JSP file changes):
1. The Web browser makes a request to the JSP page.
2. The JSP engine parses the contents of the JSP file.
3. The JSP engine creates temporary servlet source code based on the
contents of the JSP. The generated servlet is responsible for rendering the
static elements of the JSP specified at design time in addition to creating the
dynamic elements of the page.
4. The servlet source code is compiled by the Java compiler into a servlet class
file.
5. The servlet is instantiated. The init and service methods of the servlet are
called, and the servlet logic is executed.
6. The combination of static HTML combined with the dynamic elements
specified in the original JSP page definition are sent to the Web browser
through the output stream of the servlet’s response object.
This section briefly describes each of these categories.For more details on each
category, refer to Servlet and JSP Programming with IBM WebSphere Studio
and VisualAge for Java, SG24-5755.
language "scriptingLanguage"
extends "className"
import "packageList"
session "true|false"
buffer "none|sizekb"
autoFlush "true|false"
isThreadSafe "true|false"
info "infoText"
errorPage "errorUrl"
isErrorPage "true|false"
Include directive
The include directive allows substitution of text or code to occur at translation
time:
<%@ include file="relativeURLspec" %>
You can use the include directive to provide a standard header on each JSP
page, for example:
<%@ include file="banner.html" %>
Declarations
A declaration block contains Java variables and methods that are called from an
expression block within the JSP file. Code within a declaration block is often used
to perform additional processing on the dynamic data generated by a JavaBean
property.
For example:
<%!
private int count = 0;
private String getCount(int aCount)
{...method body here..;}
%>
Scriptlets
Scriptlets are used to embed small Java code blocks within the JSP page, rather
than to declare entire methods as performed in a declarations block. The syntax
for a scriptlet is:
<% scriptlet %>
Expressions
Expressions are scriptlet fragments whose results can be converted to string
objects for display in a browser. The syntax for an expression is:
<%= expression %>
Typically, expressions are used to execute and display the string representation
of variables and methods declared within the declarations section of the JSP, or
from JavaBeans that are accessed by the JSP.
Implicit objects
Within both scriptlets and expressions, there are some implicit objects available
for use without declaring them first. Table 11-2 introduces some of these implicit
objects.
11.2.4 Comments
You can use two types of comments within a JSP. The first comment style
enables the comment to appear in the output stream on the browser. It is an
HTML formatted comment whose syntax is:
<!-- comments -->
The second comment style is used to fully exclude the commented block from the
output. The syntax is:
<%-- comment text --%>
However, we will use one WebSphere extension for implementing the VisualAge
Cruise Lines sample application: the tsx:repeat tag.
The tsx:repeat tag is used to iterate through a database query result set using
the optional start and end values as the bounding indexes of the iteration. The
syntax of this tag is:
<tsx:repeat index=name start=start_index end=end_index>
</tsx:repeat>
You can also use this tag to iterate through any indexed property within a
JavaBean class or repeatedly call any method in a JavaBean until an
ArrayIndexOutOfBounds exception is thrown.
The business logic development team designs and develops the commands and
business object beans. It also designs and develops the JavaBeans needed to
provide dynamic content for the JSPs. These JavaBeans, called
DataDeliveryBeans, are delivered to the presentation development team,
importing them from VisualAge for Java to WebSphere Studio.
The purpose is to display the detail of an account balance. For this, we use the
AccountDeliveryBean and standard JSP tags as follows:
<HTML>
<HEAD>
<TITLE>
Proxy
HTTP
BusinessObject
JSP Servlet
Command
DataDeliveryBean
WML-based
WAP Servlet
JSP
WAP
HTTP
WAP
Gateway
As you can see, only the presentation aspect of our architecture is impacted. The
WAP gateway produces HTTP which is easily recognizable by our controller
(servlet), which continues to manage the JSPs and issue requests to
CommandBeans. The model layer (the CommandBean-Proxy-DBMS interaction)
remains the same as before, as does the DataDeliveryBean.
The only programming impact on our framework would be to manage some WML
content JSPs instead of HTML content JSPs. This can be accomplished by
modifying the controller servlet, as we will see later.
This discussion of adapting to WAP demonstrates the validity and strength of our
e-business architecture, which is based on the model-view-controller framework.
We begin with a brief introduction to Java servlet concepts and the Java Servlet
API. Later in the chapter, we provide details on the way to use servlets as
navigation controllers.
In addition to reading this chapter, you may also want to refer to Servlet and JSP
Programming with IBM WebSphere Studio and VisualAge for Java, SG24-5755
for much more details on Java Servlet API, the servlet runtime life-cycle, and
advanced servlet functionalities.
The Java Servlet API is a Standard Java Extension API. Throughout this book,
we use the Java Servlet Development Kit API (JSDK) V2.1 conventions.
The Servlet interface class is the central abstraction of the Java Servlet API. This
class defines the methods which servlets must implement, including the service()
method for the handling of requests. The GenericServlet class implements this
interface, and defines a generic, protocol-independent servlet. To write an HTTP
servlet for use on the Web, we use a more specialized class of GenericServlet
called HttpServlet.
The details of persistent data are well beyond the scope of this redbook. In this
section, we discuss some useful techniques for persistency in the WebSphere
Application Server (WAS) context. Persistency of data outside this WAS context
is not covered, assuming that it is the responsibility of the VisualAge Pacbase
components.
ServletContext
A servlet context (Javax.servlet.ServletContext) defines a group of related
servlets. A servlet context object is at least as unique as the host in which it
resides. In a servlet engine that handles multiple virtual hosts, each virtual host
must be treated as a separate context.
This allows for simple application-scoped data sharing between servlets, using
the getAttribute/setAttribute methods. Note that the servlet context attributes are
known as “application” attributes in the JavaServer Page specification.
Cookies
Cookies are a way to place persistent information on the client machine and to
make that information accessible from the browser.
12.1.4 Session
The HttpSession interface is the application state management API. This
interface:
Represents a client/server connection
Has a lifetime that spans multiple servlets
Is identified within requests via a session identifier
Servlets should be stateless and not store any state information within
themselves. The session is the proper repository for application state.
Sessions act like hashtables or properties. You can store any object on a
hashtable, but it must be serializable.
Processing the HTTP request from a Web browser is partially delegated to the
model layer (business logic). Sending the HTTP response to the Web browser is
partially delegated to the JSP (presentation layer). Both are assumed to be under
the control of the servlet.
The business logic development team then customizes the servlet to implement
the required control mechanism and navigation.
One extreme design approach would be to have only one servlet per use case.
That servlet would then process all requests from the client, and forward the
request to one or more JSPs to display the result. The disadvantage to using this
approach is that we will have to implement a great deal of logic in that servlet.
We recommend having only one servlet per CommandBean: that servlet being
the controller for the command execution and result. That means that a servlet
gets a request, executes the proper command, populates the resulting
DataDeliveryBean, and forwards the request to one or more JSPs for displaying
this DataDeliveryBean.
The issue of the command granularity then becomes a model design issue, with
the reminder that a CommandBean corresponds to specific business logic, such
as a query or an update.
1 BusinessObject
HTML page
or JSP
3
ControllerServlet
2 Command
5
4
JSP DataDeliveryBean
Note: To this basic control mechanism, we could add two classes: the
RequestBean class and the ResultBean class. The RequestBean would be
the generic call contract between the controller servlet and the
CommandBean. The ResultBean would be the generic return contract
between the CommandBean and the servlet. Both the RequestBean and the
ResultBean could be dynamically populated using some kind of builder,
though our framework does not go this far.
Browser
Forward
Servlet A Servlet B
Content returned
to Browser
Browser
Include
Servlet A Servlet B
Content returned
to Browser
In the case of include and forward, you must remember that JSDK 2.1 adds a
new interface:
Javax.servlet.RequestDispatcher
Note: This RequestDispatcher class is also useful to call a JSP from a servlet.
Actually, it is a good example of forward use.
All concrete controller servlets should inherit from this abstract controller servlet.
One servlet is linked to one Command implementation described by the
getCommandName method. The first time the getCommand method is
accessed, the appropriate CommandBean is created through the
CommandFactory.
The coding that follows is the recommended Java implementation of this generic
controller servlet:
public abstract class ControllerServlet extends HttpServlet {
private Command ivCommand;
The performTask method is responsible for performing the needed task. It has to
be redefined by every subclass. The redefined performTask method will trap all
exceptions and not let any propagate out. The redefined performTask method
calls the executeCommand method.
public abstract void performTask(HttpServletRequest req, HttpServletResponse
res);
The following handleException method code provides an example for the Web
Application and WebSphere logfiles. This code should be redefined by concrete
controller servlets:
protected void handleException(Throwable throwable) {
// Prints a message to the default log file for the Web Application
System.out.println(throwable.getMessage());
// Prints a message to the WS3.0 console window
log(throwable.getMessage());
}
After they have been developed, both the server-side and the client-side
components need to be tested. Following successful testing, the components
can be deployed into the production environment.
First, we focus on the VisualAge Pacbase (VAP) Test Tool, which is used to
validate server developments.
Next, we review the main servlet/JSPs testing tools available with VisualAge for
Java.
VAP Test Tool basically provides a Folder Proxy browser. The purpose is to
identify problems related to:
Folders and elementary components design and implementation
Proxies generation
Communication and middleware
Using the VAP Test Tool permits you to validate your server development and
your communication infrastructure. The tool was created to save time: you do not
have to write or wait for a graphical user interface before testing your servers.
During testing, the VAP Test Tool also provides a good way to determine whether
anomalies are “server-side” or “client-side” problems.
The VAP Test Tool is limited. Excluded from VAP Test Tool are:
Proxy API usage
Servlets design and implementation
JavaBeans design and implementation
JSPs design and implementation
WebSphere Application Server deployment
Actually, the VAP Test Tool install we did uses the VisualAge for Java Tool API to
fully integrate the VAP Test Tool inside the VisualAge for Java IDE.
The tool can also be used through the same sub-menu from the Selected menu
(or right-clicking for a context menu) when selecting a project, a package, or a
Folder proxy class.
The folders panel (on the left of Figure 13-2) provides a hierarchical view of
available folders, as shown in Figure 13-3.
For more details on the VisualAge for Java Debugger, refer to the product
documentation.
For more details on how to build, test, and run servlets in the WebSphere Test
Environment, and for more information about the use of the JSP Execution
Monitor for the testing of JSPs, refer to Servlet and JSP Programming with IBM
WebSphere Studio and VisualAge for Java, SG24-5755. Chapter 7 of this
SG24-5755 redbook shows how to test complete Web applications.
In addition, you will need to create and position the databases to support your
test data. In our case, we used DB2. Our DB2 test database was already in
existence and so we were able to leverage that for our testing. Had the database
not existed, we could have generated the DDL from VisualAge Pacbase and
used it to create our database. We could have also written, compiled, and
executed a simple batch COBOL program to process flat files and populate the
DB2 database with our test data.
You should refer to Servlet and JSP Programming with IBM WebSphere Studio
and VisualAge for Java, SG24-5755. Chapter 6 of this SG24-5755 redbook
explains the administration environment that comes with WAS, how it is
structured, and how you will use it to configure your server environment. In our
redbook, we describe where HTML pages and JSPs are deployed, nothing more.
Application Servlet
Servers Engine
Web
Applications
one
many
You can see that HTML pages and JSPs are deployed in a Web Application. After
creating the necessary components - such as a Web Application - in the
WebSphere Admin Console interface, you have to physically put the resource
files into the correct directories. Table 13-2 displays where HTML pages and
JSPs must reside.
HTML documents and .html, .shtml, .jhtml, .gif, The Web Application
related files .jpg, .au, and so forth document root (or under
the HTTP server root)
Servlets, JavaBeans, and .class, .jar, .ser The application class path or the
other Java classes Application Server class path.
If the servlets are in a package,
mirror the package structure as
subdirectories under the
application class path
The SG24-5755 redbook also explains the way to define servlets in order to
invoke them by an alias name, which is the preferred technique when using WAS.
Make sure that any backend servers required are running (for example in our
case we needed to start DB2), and then you can begin to test your e-business
application with a browser.
The SG24-5755 redbook discusses the different levels of tracing support with
WebSphere Application Server. As a reminder, within WAS there are three
different ways of collecting troubleshooting information:
Messages: Messages are visible in the Console Message pane of the
Administrative Console.
Logs: Log files are kept within the <Drive>\WebSphere\AppServer\logs
directory. Here you can find the standard error and standard output files for
each application server that is running.
Traces: To enable WAS tracing, select the menu option Console-->
Trace-->Enabled.
Customers complain that they must go to the VisualAge Cruise Lines offices to
get their tickets. Often they must wait a long time before being served. Customers
say it is difficult to get cruise information from the sales person.
Employees complain that cruise information must be obtained from papers and
leaflets. Employees spend hours on the phone waiting to make a customer
reservation only to be refused if the cruise is sold out. Employees spend too
much time updating cruise reservations.
14.3.1 Objects
The VisualAge Cruise Lines sample application needs to manage information
about the following objects:
Cruise lines
Ships
Cruises
Destinations
Reservations
Cruise lines are the companies that provide blocks of tickets to VisualAge Cruise
Lines for resale. Some customers prefer to buy tickets based on a preference for
a specific cruise line and so we need a way to manage cruise line information.
The attributes for the cruise line include:
Cruise Line ID, a system assigned number to uniquely identify the cruise line
Name, the name of the cruise line as it is known to the customer
Country, the name of the country for the cruise line
Ships are the vessels used to carry passengers. For our sample application we
need the following attributes for each ship:
Cruise Line ID, the system assigned number to uniquely identify the cruise
line that operates the ship
Registry, the number that represents the unique identifier for the ship
Name, the name of the ship as it is known to the customer
Description, free form text to describe the basic features of the ship
Cruises are actually blocks of tickets for resale by VisualAge Cruise Lines. The
attributes that we need in our sample application are:
Cruise Line ID, the system assigned number to uniquely identify the cruise
line that operates the ship
Registry, the number that represents the unique identifier for the ship
Cruise ID, the system assigned number that uniquely identifies the block of
tickets
Cruise name, the name of the cruise as it is known to the customer
Destinations are ports of departure and arrival for the cruises. The attributes
needed for each destination are:
Destination ID, this is a system assigned number to uniquely identify the
destination
Port name, this is the name of the port as it is known to the customer
Port country, this is the name of the country where the port is located
Reservation represents the purchase of one or more tickets for a cruise by the
customer. The attributes needed for the reservation include:
Reservation ID, this is a system assigned number to uniquely identify the
reservation
Cruise Line ID, the system assigned number to uniquely identify the cruise
line
Registry, the number that represents the unique identifier for the ship
Cruise ID, the system assigned number that uniquely identifies the cruise
(block of tickets)
Number of tickets, the number of tickets purchased by the customer
Total price, the total cost of the tickets for the customer
14.3.2 Relationships
In this section we describe the relationships between the objects that make up
the VisualAge Cruise Lines sample application.
The first relationship of interest involves cruise line and ship. A cruise line can
operate one or more ships and a ship is operated by one and only one cruise
line. This relationship has been implemented hierarchically.
The second relationship involves ship and cruise. Recall that a cruise is a block
of tickets. A ship can have one or more blocks of tickets (cruises) associated with
it and a block of tickets must be related to one and only one ship. This
relationship has also been implemented hierarchically
All of the attributes were defined as data elements using the e-business
developer Workbench. Figure 14-1 shows a partial display of the elements from
the e-business Workbench.
The hierarchical relationships between cruise line, ship, and cruise were
implemented as follows in VisualAge Pacbase with the e-business entity:
Cruise line becomes a folder.
Since the ship is hierarchically related to the cruise line in a mandatory
relationship, the ship becomes a dependent node in the cruise line folder.
Since the cruise is hierarchically related to the ship in a mandatory
relationship, the cruise becomes a dependent node positioned under the ship
node in the cruise folder.
CRUISE LINE
(folder)
Reference
nodes
for Departure
destination
DESTINATION Arrival
(folder, single node)
RESERVATIONS
When the customer requests a display of the cruise lines, ships, or cruises, the
list should be presented in alphabetical sequence.
If the customer has restricted the request to a specific cruise line, then the
information displayed must be for that cruise line only.
The panel in the preceding figure displays the detail for the selected cruise and
includes:
Cruise line
Ship
Ship description
Cruise
Tickets available
Price per ticket
The preceding panel is used to confirm the reservation for the customer. The
customer confirmation includes:
Reservation ID
Number of tickets purchased
Message indicating that the tickets will be mailed to the customer’s address
The cruise management system runs on the VisualAge Cruise Lines intranet.
Employees use this system to add cruise lines and the corresponding cruise
details such as ships, cruises and related information for destinations.
For the purpose of this redbook we are building the process that adds
destinations in order to demonstrate how to use VisualAge Pacbase to produce a
Web-based application.
For simplification, we set up access to the cruise management system from the
homepage. Selecting the employees hyperlink from the homepage presents
Figure 14-12.
The Rational Rose Bridge is an option that can be installed with the Workbench
e-business module.
The version of this bridge between Rational Rose and VisualAge Pacbase has
limited functionality, but it does provide the ability to populate the VisualAge
Pacbase database from a Rational Rose model. This chapter includes an
example of using the bridge between Rational Rose and VisualAge Pacbase.
The results obtained should be compared to the entities developed in the
preceding chapter.
Modeling in Rational Rose is more or less neutral. This means that the modeler
using Rational Rose does not have to be overly concerned about the VisualAge
Pacbase concepts related to how the model will be implemented in the
repository.
The bridge uses the class diagram that results from the design activity in
Rational Rose to populate application components in the VisualAge Pacbase
repository. This combines the UML (universal modeling language) strengths of
Rational Rose with the application component management strengths of
VisualAge Pacbase.
The bridge uses the toolkit provided by Rational Rose. This is the same API as
the one used by VisualAge for Java. Using XML provides traceability for changes
to the model as it progresses from Rational Rose to VisualAge Pacbase. We use
this to track the changes between our entities in VisualAge Pacbase and the
original model in Rational Rose.
15.2 Approach
The approach to combining Rational Rose with VisualAge Pacbase proceeds in
three steps:
1. Developing the analysis model (Rational Rose)
2. Exporting the model and generating VisualAge Pacbase entities (the bridge)
3. Completing and customizing the resulting entities (VisualAge Pacbase)
15.3 Constraints
Although the modeler using Rational Rose does not need to be thoroughly
educated in all of the concepts for VisualAge Pacbase, there are ways of working
in Rational Rose that will make the bridging between Rational Rose and
VisualAge Pacbase easier. Each class diagram implicitly represents a folder in
VisualAge Pacbase. This necessitates a set of rules to be followed when working
in Rational Rose. In addition, there are several constraints that must be followed
when using the bridge. These are discussed in this section.
These rules allow the bridge to produce one folder for each package.
15.3.4 Operations
There are no constraints for operations except those imposed by the UML
implementation in Rational Rose.
Only attributes and operations in the class diagram are applied because the
bridge has no way of locating any other source of inheritance.
15.3.6 Relations
In general, all relations in the class diagram must be oriented. This means that
the relation must be described from the point of view of one of the objects
participating in the relationship. In order to use the bridge between Rational Rose
and VisualAge Pacbase, all relations must be oriented. This allows the bridge to
properly identify the root node of the folder. This is illustrated in Figure 15-1.
1..* 1..1
CRUISE LINE SHIP
YES
1..* 1..1
A B
0..* 0..1
A B
1..* 1..1
A B
15.3.8 Associatives
Associatives result when one object (A) can be related to multiple occurrences of
another object (B), which can also be related to multiple occurrences of the other
object (A). This is referred to as a many-to-many relationship and is shown in the
top portion of the following figure. Implementing this type of relationship presents
technical difficulties in most database management systems.
0..* 0..*
A B
A B
1..1 1..1
Using the Rose Bridge tab, enter the normalized prefix for your components and
the libraries in the VisualAge Pacbase repository where you would like them
located. We used the settings shown in Figure 15-8.
The resulting folders from the bridging process is seen in Figure 15-12.
For example, in Figure 15-14 you can see that the data elements created need
such things as:
A better name
An abstract data type
A length for the variable field
The final step involves saving your components in the VisualAge Pacbase
repository. We recommend that you save each bridge in a separate local
workspace until your model stabilizes. When the model is stable you can then
save the components to the VisualAge Pacbase server repository.
16.1.1 Cruise
Cruises are actually blocks of tickets for resale by VisualAge Cruise Lines.
Definition
We defined our logical view as follows:
Code: Cruise
Label: Cruise
Short Code: BT05
Composition
Our composition is shown in Figure 16-1.
Definition
We defined our logical view as follows:
Code: CruiseLine
Label: Cruise Line
Short code: BT01
Composition
Our composition is shown in Figure 16-2.
16.1.3 Reservation
Reservation represents the purchase of one or more tickets for a cruise by the
customer.
Definition
We defined our logical view as follows:
Code: Reservation
Label: Reservation
Short Code: BT03
Composition
Our composition is shown in Figure 16-3.
16.1.4 Ship
Ships are the vessels used to carry passengers.
Definition
We defined our logical view as follows.
Code: Ship
Label: Ship
Short Code: BT04
Composition
Our composition is shown in Figure 16-4.
16.2.1 Cruise
Here we supplement the logical view Cruise.
Definition
We defined our elementary component as follows:
Code: Cruise
Label: Cruise
Short Code: EC1400
Component Type: Hierarchical
COBOL program ID: PGMCRU
Type of code to generate: VisualAge COBOL
Composition
Our composition is shown in Figure 16-5.
LINEID LINEID
REGIST REGIST
CRUSID CRUSID
CRUSNM CRUSNM
DPPRID DPPRID
ARPRID ARPRID
NBAVTK NBAVTK
NBRES NBRES
FRETXT FRETXT
16.2.2 CruiseLine
Here we supplement the logical view CruiseLine.
Definition
We defined our elementary component as follows:
Code: CruiseLine
Label: CruiseLine
Short Code: EC1200
Component Type: Hierarchical
COBOL program ID: PGMLIN
Type of code to generate: VisualAge COBOL
Composition
Our composition is shown in Figure 16-6.
Our figure does not show the data element transfer. Our key filed transfers were
filled as shown in Table 16-3.
LINEID LINEID
LINENM LINENM
CTRYNM CTRYNM
Definition
We defined the elementary component Reservation as follows:
Code: Reservation
Label: Reservation
Short Code: EC1100
Component Type: Hierarchical
COBOL program ID: PGMRES
Type of code to generate: VisualAge COBOL
Composition
Our composition of the elementary component Reservation is shown in Figure
16-7.
RESID RESID
CRUSID CRUSID
NBTIK NBTIK
16.2.4 Ship
Here we supplement the logical view Ship.
Definition
We defined our elementary component Ship as follows:
Code: Ship
Label: Ship
Short Code: EC1300
Component Type: Hierarchical
COBOL program ID: PGMSHP
Type of code to generate: VisualAge COBOL
Composition
Our composition is shown in Figure 16-8.
Our figure does not show the data element transfer. Our key field transfers were
filled as shown in Table 16-7.
REGIST REGIST
SHIPNM SHIPNM
FRETXT FRETXT
16.3.1 Reservation
The Reservation folder only contains the Reservation node.
Definition
We have defined the Reservation folder as follows:
Code: Reservation
Label: Reservation
Short Code: RESERV
e-business application short code: CruiseApplication
COBOL program ID: RESERV
Type of code to generate: VisualAge COBOL
Package code: com.cruise.reservation.proxies
Figure 16-12 shows the properties for the dependent node SHIP.
The next node is the reference node Destination. This node is referenced for two
things, arrival ports and departure ports. The Departure reference is shown in
Figure 16-14.
16.4 Generating
There are two separate things which need to be generated from VisualAge
Pacbase 3.0, the servers and the Java Proxies. The generation of the servers is
done using the Generation Manager. Using the Generation Manager is shown in
Chapter 5.
Clicking this button causes the Client/Server Facility-Generator appear. Here you
can select which folder or e-business application needs to be generated. The left
panel shows the composition and the right panel shows the definition of a
selected entity as shown in Figure 16-17.
By clicking the Finish button, VisualAge Pacbase 3.0 will generate the
necessary Java files. Importing these files into VisualAge Java is discussed in
the next chapter.
Figure 17-1 shows the VisualAge for Java Workbench after these loads and
creations.
Figure 17-3 shows the packages that were created during the import.
This class extends the generated DestinationProxy class and implements the
BusinessObject interface.
In the preceding figure, the process to create a new instance follows these steps:
1. Modifies locally the detail property of the proxy using the detail() method.
2. Creates locally a new instance from the modified detail property, using the
createInstance() method.
3. Sends the request for a new instance to the server, using the updateFolder()
method.
Modifying a destination
The method modifyDestination provides a service to modify a destination is as
follows:
public void modifyDestination(int destinationPortId, String
destinationPortName, String destinationCountry) throws LocalException,
ServerException {
//read the instance which port id is destinationPortId
selectionCriteria().setPortid(destinationPortId);
readInstance();
//modify the instance
detail().setPortnm(destinationPortName);
detail().setCtrynm(destinationCountry);
modifyInstance();
//update the folder (COMMIT)
updateFolder();
}
In the preceding figure, the process to get all instances sorted is accomplished
by these steps:
1. Sets a new DataComparator class, here a DestinationDataComparator, which
is responsible for sorting the rows of the proxy.
2. Reads all requested instances, using the selectInstances() method.As a
result, the requested instances are put in the rows property of the proxy.
3. Returns the rows in a DataDescriptionVector instance, using the getRows()
method. Notice that this getRows() method is only available because our
business object inherits from the proxy. Actually, getRows() is a protected
method, the public method returning the rows is rows().
Two methods are redefined. The first method redefines the inherited method, and
is called automatically by VisualAge Pacbase:
public int compare(Object daton1, Object daton2) {
return compare((DestinationData) daton1, (DestinationData) daton2);
}
In the preceding figure, the process to retrieve a specific instance is done by the
next steps:
1. Fills the selection criteria to retrieve the requested instance, using the
selectionCriteria() method.
2. Reads the requested instance from the server, using the readInstance()
method. As a result, the requested instance is put in the detail property of the
proxy.
3. Returns the detail property, which is an instance of DestinationData.
This class extends the generated CruiseLineProxy class and implements the
BusinessObject interface.
We could have chosen to do a server sort, using an Extract method. In this case,
the code for the getCruises method is as follows:
public DataDescriptionVector getCruiseLines() throws LocalException,
ServerException {
//identify that no local sort will be used
setLocalSort(false);
//use the appropriate Extract method
setExtractMethodCode("SORTBYNAME");
//select all
selectInstances();
return getRows();
}
In the preceding coding, the process for getting all of the instances in a formatted
vector is described by the following steps:
1. Fills the selection criteria to retrieve the cruise line instance, using the
selectionCriteria() method.
2. Reads the requested cruise line instance and all of its dependent nodes from
the server, using the readInstanceWithAllChildren() method. Note that calling
this readInstanceWithAllChildren() method does in one step the same thing s
calling the readInstance() method and then subsequently using the
readAllChildrenFromCurrentInstance() method.
3. Enumerates the rows of the first depending node (ShipProxy). For each
ShipData, positions it as the current proxy detail by using the
readDetailFromDataDescription method.
4. Next enumerates the rows of the second depending node (CruiseProxy). For
each CruiseData, positions it as the current proxy detail by using the
readDetailFromDataDescription method. It further constitutes one return
array by aggregating the current detail properties for CruiseLineProxy,
ShipProxy, and CruiseProxy and adds this array to the resulting vector.
5. Returns the resulting vector.
In the preceding coding, we decided not to use the proxy cache. Had we used
the proxy cache, the code would look like the following:
public CruiseData getCruise(int cruiseId) throws LocalException,
ServerException {
CruiseData data = new CruiseData();
data.setCrusid(cruiseId);
getCruiseProxy().restoreSelection(data);
return getCruiseProxy().detail();
}
Also In the preceding coding, we use two private methods to load the linked
reference nodes from the server.
To access this instance that we have just loaded, we use the following method:
public DestinationDataARR getArrivalData() {
return (DestinationDataARR) getCruiseProxy().getArrival().detail();
}
This class extends the generated ReservationProxy class and implements the
BusinessObject interface.
GetDestinationsCommand
The GetDestinationsCommand class is shown in Figure 17-7.
GetUniqueDestinationCommand
The GetUniqueDestinationCommand class is shown in Figure 17-8.
ModifyDestinationCommand
The ModifyDestinationCommand class is shown in Figure 17-9.
AddDestinationCommand
The AddDestinationCommand class is shown in Figure 17-10.
In the preceding figure, we can see that input and output arguments are coded
as JavaBean properties.
The reset() method initializes the content of these properties, and the
isReadyToCallExecute() method checks that all needed properties are filled
before calling the execute() method. The same applies for all other commands,
so we will not discuss this anymore since the code is always similar.
GetCruiseLinesCommand
The GetCruiseLinesCommand class is shown in Figure 17-11.
GetCruisesCommand
The GetCruisesCommand class is shown in Figure 17-12.
The toArray method is responsible for transforming the vector, which is in fact a
vector of [CruiseLineData,ShipData,CruiseData] arrays, into a
CruiseDataDeliveryBean array:
private CruiseDataDeliveryBean[] toArray(Vector v) throws LocalException {
int index = 0;
CruiseDataDeliveryBean[] cdba = new CruiseDataDeliveryBean[v.size()];
Enumeration e = v.elements();
while (e.hasMoreElements()) {
//get one [CruiseLineData,ShipData,CruiseData] data array
DataDescription[] dataArray = (DataDescription[]) e.nextElement();
CruiseLineData cruiseLineData = (CruiseLineData) dataArray[0];
ShipData shipData = (ShipData) dataArray[1];
CruiseData cruiseData = (CruiseData) dataArray[2];
//create a new cruiseDataDeliveryBean and populates it
CruiseDataDeliveryBean cddb = new CruiseDataDeliveryBean();
//cruise line information
cddb.setCruiseLineCountry(cruiseLineData.getCtrynm());
...
//ship information
cddb.setShipRegistry(shipData.getRegist());
...
//cruise information
cddb.setId(cruiseData.getCrusid());
...
cdba[index] = cddb;
index++;
}
return cdba;
}
BookCruiseCommand
The BookCruiseCommand is shown in Figure 17-14.
Once the project was created, two folders named servlet and theme were
created by default. Included in the theme folder was a cascading style sheet
named Master.css. Using this cascading style sheet allows the designer to
standardize the appearance of the pages by defining HTML tags once and then
referencing the tags from the other pages.
18.1.2 Setting versions for the JSP and the application server
WebSphere Studio version 3 supports both JSP 0.91 and JSP 1.0 versions. JSP
version is set for each project.
Concerning our project, we specified the JSP 1.0 version and the AppServerV3
application server version, using the Edit -> Properties menu, as shown in
Figure 18-1.
For our VisualAge Cruise Lines sample application we decided to add a new
stage, named WebSphere Test Environment. We used this for publishing to the
WebSphere Test Environment.
html d:\IBMVJava\ide\project_resources\IBM
WebSphere Test
Environment\hosts\default_host\default_a
pp\web
servlet d:\IBMVJava\ide\project_resources\IBM
WebSphere Test
Environment\hosts\default_host\default_a
pp\servlets
Every HTML page is linked to the Master.css style sheet, and references various
icons in GIF format.
DestinationsCatalog.jsp
The DestinationsCatalog.jsp page displays a list of destinations. Two actions are
possible:
Clicking a line from the display opens the appropriate destination detail page
by calling the GetUniqueDestinationServlet class.
Clicking the Add destination button opens an empty destination page by
calling the AddDestinationServlet class.
The WebSphere Studio relations view for this page is shown in Figure 18-9.
We use this DataDeliveryBean when building the list, using the jsp:repeat tag as
follows:
<TABLE border="1" width="400">
<TBODY>
<TR bgcolor="#993366">
<TH><FONT color="#FFFFFF">Port name</FONT></TH>
<TH><FONT color="#FFFFFF">Country</FONT></TH>
</TR>
<tsx:repeat index="i">
<TR>
<TD><A
href="/servlet/com.ibm.redbooks.sg246201.destination.GetUniqueDestinationServle
t?code=<%= destinationArrayDataDeliveryBean.getDestinationPortId(i) %>"><%=
destinationArrayDataDeliveryBean.getDestinationPortName(i) %></A></TD>
<TD><%= destinationArrayDataDeliveryBean.getDestinationCountry(i) %></TD>
</TR>
</tsx:repeat>
</TBODY>
</TABLE>
In the preceding code, notice that the destinationPortId attribute for each line is
used as a parameter when calling the GetUniqueDestinationServlet class.
DestinationAdding.jsp
The DestinationsAdding.jsp page displays an empty destination form. After filling
in the fields, the employee can save the new destination by clicking the Submit
button, which will call the AddDestinationServlet class.
The WebSphere Studio relations view for this page is shown in Figure 18-10.
DestinationDetail.jsp
The DestinationDetail.jsp page displays the selected destination detail. The
employee can save the modified destination by clicking the Submit button, which
will call the ModifyDestinationServlet class.
The WebSphere Studio relations view for this page is shown in Figure 18-11.
CustomerHomePage.JSP
The CustomerHomePage.jsp page displays the cruise lines list. The customer
can select one cruise line by clicking it, which will call the GetCruisesServlet
class.
WebSphere Studio relations view for this page is shown in Figure 18-12.
We use this DataDeliveryBean when building the list, using the jsp:repeat tag, in
the same way that we did for the destinations list.
CruisesList.JSP
The CruisesList.jsp page displays the cruises list. The customer can select one
cruise by clicking it, which will call the GetCruiseDetailServlet class.
WebSphere Studio relations view for this page is shown in Figure 18-13.
CruiseDetail.JSP
The CruiseDetail.jsp page displays the selected cruise detail. The customer can
choose the number of tickets and click the Purchase button, which will call the
BookCruiseServlet class.
WebSphere Studio relations view for this page is shown in Figure 18-14.
We use this DataDeliveryBean with jsp:getProperty tag when setting the existing
value for fields.
Notice here that we use the session scope for the DataDeliveryBean, instead of
request scope. We reuse it in the next section.
Confirmation.JSP
The Confirmation.jsp page displays the reservation identifier and confirms the
cruise detail.
WebSphere Studio relations view for this page is shown in Figure 18-15.
18.3.3 CommandException.JSP
CommandException.jsp is a simple error page for reporting application errors,
and more precisely the command exceptions.
WebSphere Studio relations view for this page is shown in Figure 18-15.
For our VisualAge Cruise Lines sample application, we needed the following
Unitary DataDeliveryBeans:
CruiseDataDeliveryBean
ReservationDataDeliveryBean
DestinationDataDeliveryBean
For our VisualAge Cruise Lines sample application, we needed the following
Array DataDeliveryBeans:
CruiseLinesArrayDeliveryBean
CruisesArrayDeliveryBean
DestinationsArrayDataDeliveryBean
DestinationArrayDataDeliveryBean
The DestinationArrayDataDeliveryBean class inherits from the
DataDeliveryBean class and provides data for displaying the list of destinations.
For each indexed destination, it provides the following services:
public String getDestinationCountry(int index)
public int getDestinationPortId(int index)
public String getDestinationPortName(int index)
DestinationDataDeliveryBean
The DestinationDataDeliveryBean class inherits from the DataDeliveryBean
class and provides data for displaying a specific destination. It provides the
following properties as shown in Figure 18-17.
CruiseArrayDataDeliveryBean
The CruiseArrayDataDeliveryBean class inherits from the DataDeliveryBean
class and provides data for displaying the list of cruises. For each indexed cruise,
it provides the following services:
public int getCruiseId(int index)
public int getCruiseLineId(int index)
All of these services are coded in the same way. For example, the
getShipRegistry implementation follows:
public String getShipRegistry(int index) {
if (getCruiseDataDeliveryBeanArray() == null)
throw new ArrayIndexOutOfBoundsException(); //to provoke end of repeat
tag in JSP
return ((CruiseDataDeliveryBean)
getCruiseDataDeliveryBeanArray()[index]).getShipRegistry();
}
CruiseDataDeliveryBean
The CruiseDataDeliveryBean class inherits from the DataDeliveryBean class
and provides data for displaying a specific cruise. It provides the following
properties as shown in Figure 18-18.
CruiseLineArrayDataDeliveryBean
The CruiseLineArrayDataDeliveryBean class inherits from the DataDeliveryBean
class and provides data for displaying the list of cruise lines. For each indexed
cruise line, it provides the following services:
public int getCruiseLineId(int index)
public String getCruiseLineName(int index)
ReservationDataDeliveryBean
The ReservationDataDeliveryBean class inherits from the DataDeliveryBean
class and provides data for displaying a specific reservation. It provides the
following properties as shown in Figure 18-19.
GetDestinationsServlet
The GetDestinationsServlet class is shown in Figure 18-20.
getServletContext().getRequestDispatcher("/jsp/DestinationsCatalog.jsp").forwar
d(req, res);
} catch (IOException ioe) {
handleException(ioe);
} catch (ServletException se) {
handleException(se);
}
}
Note: In the preceding code, we explictly referenced some servlet and/or JSP
names. Please note that we did this in order to present more readable source
code for this redbook. Explicit references are not the recommended practice.
Instead, you should use static methods or variables to centralize such
hard-coded information, and eventually externalize it.
The performTask method first checks the phase. In phase “one”, it executes the
command to create an empty destination, and then forwards the request to the
DestinationAdding JSP as follows:
getServletContext().getRequestDispatcher("/jsp/DestinationAdding.jsp").forward(
req, res);
} catch (IOException ioe) {
handleException(ioe);
} catch (ServletException se) {
handleException(se);
}
getServletContext().getRequestDispatcher("/servlet/com.ibm.redbooks.sg246201.de
stination.GetDestinationsServlet").forward(req, res);
} catch (IOException ioe) {
handleException(ioe);
18.5.3 GetUniqueDestinationServlet
The GetUniqueDestinationServlet class is shown in Figure 18-22.
getServletContext().getRequestDispatcher("/jsp/DestinationDetail.jsp").forward(
req, res);
} catch (IOException ioe) {
handleException(ioe);
} catch (ServletException se) {
handleException(se);
}
ModifyDestinationServlet
The ModifyDestinationServlet classis shown in Figure 18-23.
The performTask method populates the command, executes it, populates the
appropriate DataDeliveryBean, and forwards the request to the
GetDestinationsServlet.
GetCruiseLinesServlet
The GetCruiseLinesServlet class is shown in Figure 18-24.
Figure 18-25 summarizes the flow for this first step of the customer activity.
CruiseLines
BusinessObject
HTML
Main Menu
GetCruiseLines GetCruiseLines
Servlet Command
JSP CruiseLinesArray
Customer
DataDeliveryBean
Home Page
GetCruisesServlet
The GetCruisesServlet class is shown in Figure 18-26.
The performTask method populates the command, executes it, populates the
appropriate DataDeliveryBean, puts it in the request, and forwards the request to
the CruisesList JSP.
Reservation
BusinessObject
JSP
Cruise Detail
BookCruise BookCruise
Servlet Command
JSP Reservation
Confirmation DataDeliveryBean
Cruise
DataDeliveryBean
The performTask method populates the command, executes it, populates the
appropriate DataDeliveryBean, puts it in the session, and forwards the request to
the CruiseDetail JSP.
Reservation
BusinessObject
JSP
Cruise Detail
BookCruise BookCruise
Servlet Command
JSP Reservation
Confirmation DataDeliveryBean
Cruise
DataDeliveryBean
BookCruiseServlet
The BookCruiseServlet class is shown in Figure 18-30.
getServletContext().getRequestDispatcher("/jsp/Confirmation.jsp").forward(req,
res);
} catch (IOException ioe) {
handleException(ioe);
} catch (ServletException se) {
handleException(se);
}
}
Reservation
BusinessObject
JSP
Cruise Detail
BookCruise BookCruise
Servlet Command
JSP Reservation
Confirmation DataDeliveryBean
Cruise
DataDeliveryBean
This section discusses the changes we made to our sample application to make
it WAP-compliant.
The main point to remember is that to make your application WAP-compliant you
have nothing to change regarding the Model layer. The commands, business
objects, proxies, and servers are the same, only the presentation differs.
The following code was used to produce the WML homepage for VisualAge
Cruise LInes sample application (WAP) as follows:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta http-equiv="Cache-Control" content="max-age=30"
forua="true"/></head>
<card id="VCLHomePage" title="VCL">
<p>Welcome to the VisualAge Cruise Lines WAP site<br/>
</p>
<p><a
href="/servlet/com.ibm.redbooks.sg246201.cruiselines.wap.GetCruiseLinesServlet"
>Customer Area</a>
</p>
<do type="prev" label="Back"><prev/></do>
</card>
</wml>
WML-based JSPs means that we use WML tags and JSP tags. On each JSP, we
have to specify the content type, adding the following directive tag:
<%@ page language="Java" contentType="text/vnd.wap.wml" %>
WapCustomerHomePage.jsp
The following code was used to produce the customer homepage for VisualAge
Cruise LInes sample application (WAP) as follows:
class="com.ibm.redbooks.sg246201.cruiselines.CruiseLineArrayDataDeliveryBean"
scope="request" />
<card id="CustomerArea" title="Customer Area">
<do type="prev" label="Back"><prev/></do>
<p>Only our discount cruises are available from the WAP site.<br/>
For more cruises, please refer to the Web site.<br/>
</p>
<tsx:repeat index="i">
<p><a
href="/servlet/com.ibm.redbooks.sg246201.cruiselines.wap.GetCruisesServlet?code
=<%= cruiseLineArrayDataDeliveryBean.getCruiseLineId(i) %>"><%=
cruiseLineArrayDataDeliveryBean.getCruiseLineName(i) %></a></p>
</tsx:repeat>
</card>
</wml>
The homepage for VisualAge Cruise Lines (WAP) is shown in Figure 18-32.
WapCruisesList.jsp
The code for the display of the cruises list follows:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta http-equiv="Cache-Control" content="max-age=30" forua="true"
/></head>
<%@ page language="Java" contentType="text/vnd.wap.wml" %>
<jsp:useBean id="cruiseArrayDataDeliveryBean"
class="com.ibm.redbooks.sg246201.cruiselines.CruiseArrayDataDeliveryBean"
From the homepage, customers can proceed to a page where they can enter
they can select all cruise lines or a specific cruise line. This is shown in Figure
18-33.
WapCruiseDetail.jsp
Detailed information about the cruise is built and presented with the following
code as follows:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta http-equiv="Cache-Control" content="max-age=30" forua="true"
/></head>
<%@ page language="Java" contentType="text/vnd.wap.wml" %>
<jsp:useBean id="cruiseDataDeliveryBean"
class="com.ibm.redbooks.sg246201.cruiselines.CruiseDataDeliveryBean"
scope="session" />
<card id="CruiseDetail" title="Cruise Detail">
<do type="prev" label="Back"><prev/></do>
This results in Figure 18-34 which shows the display of the cruises detail.
WapConfirmation.jsp
Detailed information about the confirmation is built and presented with the
following code as follows:
?xml version="1.0"?>
class="com.ibm.redbooks.sg246201.reservation.ReservationDataDeliveryBean"
scope="request" />
<card id="ReservationOK" title="Reservation is done">
<do type="prev" label="Back"><prev/></do>
<p align="left">
Congratulations ! You will receive a complete reservation form by
mail.<br/>
Your reservation identifier is: <jsp:getProperty
name="reservationDataDeliveryBean" property="reservationId"/>
</p>
</card>
</wml>
This results in Figure 18-35 which shows the display of the cruises detail.
getServletContext().getRequestDispatcher("/wml/WapConfirmation.jsp").forward(re
q, res);
} catch (IOException ioe) {
handleException(ioe);
} catch (ServletException se) {
handleException(se);
}
}
Fortunately, on the Internet you can find free limited versions of software that
simulates a WAP browser without needing a WAP gateway. These products
interact with an HTTP server, assuming that the return (HTTP response) will be
WML-compliant.
All JSPs must be suffixed with .jsp, to make sure that WTE will compile them. On
each WML-based JSP, you have to specify the content type, adding the following
directive tag:
<%@ page language="Java" contentType="text/vnd.wap.wml" %>
Concerning the WebSphere terminology and the deployment process, you will
find more detail in Servlet and JSP Programming with IBM WebSphere Studio
and VisualAge for Java, SG24-5755.
If the WebSphere administrative Server status shows that it is started, you can
start the Administrative Console from the Start menu by selecting the
Administrator’s Console in the IBM WebSphere -> Application Server 3.0
folder.
Click Next and you are prompted to select the servlet engine as shown in Figure
19-3.
Figure 19-4 Configuring the Web application: virtual host and Web path
The last step prompts you for the document root and the classpath (for servlets)
of the Web application. The directories that are proposed are based on the Web
path specified in the previous step as shown in Figure 19-5.
Figure 19-5 Configuring the Web application: document root and class path
Figure 19-6 shows the directories we created for our new Web application vcl.
Figure 19-7 shows the directory structure after deploying the view.
You must restart the application server, which adds the additional directories and
jar files to the system class loader classpath.
For our VisualAge Cruise Lines Web application we selected the default
virtual_host, and set up the Web path as /vcl. Therefore, the URL for testing our
application will be:
http://<IP address>/vcl/html/VisualAgeCruiseLines.html
Note: To avoid changing all servlet calls when deploying into a different
directory structure, we recommend that you externalize explicit references to
servlets and/or JSPs.
We defined all our servlets in WAS by selecting the vcl Web application in the
Topology tab, and selecting Create -> Servlet from the context menu.
Figure 19-11 shows the result for our vcl Web application.
Note: Another way to define servlets is to customize the XML config file. We
will not discuss this further, but it is a practical solution when you have a lot of
servlets to define.
For an example of the need for a technical component, consider that all
elementary components that call each other must have the same user buffer and
the same server buffer which are defined once in the e-business application.
Thus, the e-business application in VisualAge Pacbase is purely a technical
component which groups a set of programs that can call each other and that
share other common characteristics.
Considering these facts, the main criteria for defining an e-business application
centers on the user buffer requirements to support the calling of programs within
the deployed application. The content of the e-business application is based on
this technical concern. Resist the temptation to use the e-business application as
a functional grouping.
For our VisualAge Cruise Lines sample application, we used an indexed file for
our working file. We followed these steps to accomplish this:
1. The path to this working file needs to be indicated in the Windows/NT
environment parameters, so that the folder manager finds it at runtime. We
defined a user variable named WF00IX.
2. We defined two data elements to support the detail of our working file:
– Keywf, 37-characters long, alphanumeric, defined as the segment key
– Detail, 250 characters long, alphanumeric, as a simple field
3. We also defined the working file as a segment in VisualAge Pacbase in order
for the e-business application components to know its logical name and
structure. This segment contained two data elements:
– Keywf, the segment key
– Detail, as a data field
4. We also built, generated, and compiled a simple program using VisualAge
Pacbase to produce this file.
VisualAge Pacbase allows you to generate the source for error messages as a
file that consists of a key to retrieve the message and the text of the error
message. This file can be processed with a utility, for example, to load it into a
DB2 table for use with an application. In our sample application, we chose to use
the file to populate the Java properties. When application specific errors occurred
on the server, the key for the error was sent back to the client. The key was then
used by the client to retrieve the corresponding error message so that the text of
the message could be displayed to the end-user.
Part 3 Appendixes
In this section, we provide the supplentary coding examples that go along with
this book.
Select the Additional materials and open the directory that corresponds with
the redbook form number, SG246201.
The repository data is zipped inside the VAJRepositoryData.zip file. Unzip this
file in a VAJRepositoryData subdirectory. The repository data is now located
at...\VAJRepositoryData\SG246201.dat.
When you import the repository data, select the following projects, and add each
to your Workbench:
SG246201 Redbook Framework, which includes the following packages:
– com.ibm.redbooks.sg246201.framework.businessobject
– com.ibm.redbooks.sg246201.framework.command
– com.ibm.redbooks.sg246201.framework.forms
– com.ibm.redbooks.sg246201.framework.servlet
The repository data is zipped inside the WStudioWAR.zip file. Unzip this file in a
WStudioWAR subdirectory. The repository data is now located at:
...\WStudioWAR\SG246201.war.
To import this .WAR file, select File->Open Archive... and open the above .WAR
file. You are then presented with options that pertain to importing the archive.
At the Extract tab, select Create new project and extract entire archive.
At the Destination tab, select Custom locations and type in the directory name
that you want to use.
At the Options tab, select Use archived publishing targets so that you do not
have to set up your publishing target again.
When you finish selecting the options, click the Extract button.
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.
IBM Redbooks
For information on ordering these publications, see “How to get IBM Redbooks”
on page 437.
Connecting the Enterprise to the Internet with MQSeries and VisualAge Java,
SG24-2144
Application Development with VisualAge for Java Enterprise, SG24-5081
VisualAge for Java Enterprise Version 2 Team Support, SG24-5245
Programming with VisualAge for Java Version 2, SG24-5264, published by
Prentice Hall, ISBN 0130212989, 1999 (IBM form number SR23-9016)
Developing an e-business Application for the IBM WebSphere Application
Server, SG24-5423
VisualAge for Java Version 3: Persistence Builder with GUIs, Servlets, and
Java Server Pages, SG24-5426
WebSphere Application Servers: Standard and Advanced Editions,
SG24-5460
IBM WebSphere and VisualAge for Java Database Integration with DB2,
Oracle, and SQL Server, SG24-5471
The XML Files: Using XML and XSL with IBM WebSphere 3.0, SG24-5479
The Front of IBM WebSphere, Building e-business User Interfaces,
SG24-5488
WebSphere Version 3 Performance Tuning Guide, SG24-5657
Servlet/JSP/EJB Design and Implementation Guide, SG24-5754
Servlet and JSP Programming with IBM WebSphere Studio and VisualAge for
Java, SG24-5755
User to Business Patterns for Topology 1 and 2 using WebSphere Advanced
Edition, SG24-5864
Index 441
distributing the work among development teams folder resulting from the bridging process 322
211 folder structure for SG246201 Redbook project 378
documentation entities 193 folder view 217
dynamic part of the tool bar 145 folders 335
forward development path 202
framework overview 22
E Function 60 157
e-business application 215, 219, 426
e-business application from the bridging process
323 G
edit host options 80 gateway considerations 98
editing the workspace class path 95 generate button 341
editing the workspace resources (options window) generated applications 199
94 generated methods 239
element detail to complete 324 generating 340
elementary component 177, 214, 222 generating the VisualAge Pacbase entities 320
elementary components 329 generation manager 152–153
Cruise 329 generation options 342
CruiseLine 330 generic controller servlet 275
Reservation 332 GetCruiseDetailCommand 370
Ship 333 GetCruiseDetailCommand class 370
elementary components from the bridging process GetCruiseDetailServlet 404
322 GetCruiseDetailServlet class 404
employee JSPs 382 GetCruiseLinesCommand 366
EmployeeActions HTML page 382 GetCruiseLinesCommand class 367
EmployeeHomePage HTML page 381 GetCruiseLinesServlet 400
Empty HTML page 381 GetCruiseLinesServlet class 400
empty Workbench 140 GetCruisesCommand 368
environment GetCruisesCommand class 368
administration 39 GetCruisesServlet 401
installation 39 GetCruisesServlet class 402
setup 39 GetDestinationsCommand 360
error file 219 GetDestinationsCommand class 360
error handling 23 GetDestinationsServlet 393
error server 216, 428 GetDestinationsServlet class 393
example using the DataDeliveryBean 264 getting a specific cruise 357
expressions 261 getting a specific destination using its unique key
external controls 130 353
extract method 220 getting all cruise lines 355
getting all cruises for a cruise line 355
getting all destinations 352
F GetUniqueDestinationCommand 361
factory pattern 247
GetUniqueDestinationCommand class 362
file menu 141
GetUniqueDestinationServlet 397
finishing the folder 226
GetUniqueDestinationServlet class 397
Folder 233
granularity 272
folder 216, 311
CruiseLine 336
Reservation 335 H
folder composition for CruiseLine 336 help menu 143
Index 443
M opening the Rose model file 318
main local services for a dependent or reference operating the bridge 317
proxy 235 operations 312
main local services for a folder proxy 234 options for the administration database 48
MainMenu HTML page 381 organizing the repository for reusability 187
maintenance considerations 197 orienting relations 313
making VisualAge Pacbase Java environment a fea-
ture 97
managing libraries 134
P
Pac/Transfer 120
mapping between dependent proxy and server 238 Pac/Transfer database selection 122
mapping between folder proxy and server 236 Pac/Transfer selection criteria tabs 123
mapping between reference proxy and server 238 Pac/Transfer SmartGuide 121
menu bar 140 packages 311
method page directive 259
detail() 235–236 parameterized input aid 194
getDetailFromDataDescription(aData) parameters added by default 119
235–236 partial listing of files for workstation 84
getTableModel() 235–236 patterns design process
getUpdatedFoldersTableModel() 235 choose application topology 18
getUpdatedInstancesTableModel() 235–236 choose business pattern 18
getXxx() (for example, getCabinProxy()) 235 choose runtime topology 18
selectionCriteria() 235–236 defining application architecture 18
undoLocalFolderUpdates(aDataUpdate) 235 defining products 18
undoLocalUpdate(aDataUpdate) 235 defining the runtime context 18
methodology support 5 development framework 18
middleware 27 development standards 18
middleware communications type 79 within the development context 18
model within the runtime context 18
command bean and business objects 22 performance 13
model layer summary 255–256 persistence management 14
Model-View-Controller (MVC) framework 21 persistency management 269
ModifyDestinationCommand 363 PO cinemtics window 175
ModifyDestinationCommand class 363 portability 199
ModifyDestinationServlet 398 positioning the repository 191
ModifyDestinationServlet class 399 preparing the VisualAge environment 344
modifying a destination 351 preparing the WebSphere Studio environment 376
MQSeries 34 proceeding to install the administration database
MQSeries messaging environment 32 53
proceeding with the Workbench installation 81
N processing entities 194
node by node retrieval, option 1 241 product mapping 20
node by node retrieval, option 2 242 profiles 116
nodes 221 programming bar 164
non JSP resulting servlets 273 programming concepts 155
programming process 263, 271
Programs tab added to the workbench 89
O progress of the system installation 45
one-layer architecture 8
properties for Cruise 338
opening default.cfg for the Workbench 86
Index 445
agement) 20 specifying Pac/Transfer change numbers (DSMS
IBM HTTP Server (HTTP server) 20 only) 127
JDK1.1.7 (Java Virtual Machine) 20 specifying sessions for Pac/Transfer 124
WebSphere Application Server Advanced Edi- specifying source and target libraries 125
tion (Java application server) 20 specifying the communications type 75
Windows NT 4.0 (operating system) 20 specifying the external controls 130
runtime testing 286 specifying the gateway IP address and port 77
runtime topology specifying user codes for Pac/Transfer 126
communications 19 standard tool bar icons 144
database management system 19 starting the Administrative Console 418
operating system 19 starting the administrator workbench 101
starting the installation 41
starting the Web application 425
S starting WebSphere Application Server as a service
sample proxy hierarchy 240
419
save all button 151
subclassing the servlets 413
save button 145
submit and save button 155
scriptlets 260
successful installation of development database 61
search button 144
successful installation of the administration data-
security 14
base 54
select identifier window 182
summary of development environment 37
selecting the WebSphere Test Environment feature
summary of runtime environment 38
93
support for e-business 6
selecting the Workbench modules 74
system directories 62
server-side implementation 206
services manager 217
serving dynamic WML content using servlets and T
JSPs 265 tabs for the VisualAge Pacbase administrator work-
servlet process flow 268 bench 106
ServletContext group 269 tabs for the workbench 87
servlets 15 team considerations 211
servlets - Include and Forward 274 technical environment 218
session 270 terminology 4
setting a technical context 207 testing 210
setting the Java classpath 347 testing and deployment 203–204, 277
setting the JSP version 347 testing the e-business application 227
setting the JSP version in WebSphere Studio 377 testing with the WAP application 415
setting versions for the JSP and the application serv- three-layer architecture with applet/servlet 11
er 376 three-layer architecture with JSP/servlet 12
settings for the Rose Bridge import 319 top half of the import SmartGuide 146
show details button 148 traffic loads 13
signing on to the VisualAge Pacbase administrator two-layer architecture 9
workbench 102 two-layer architecture with applets and JDBC 10
signon library view 198
singleton pattern 246
SmartGuide for adding a profile 117
U
Unified Modeling Language (UML) 5
SmartGuide for Workbench installation 70
updating the application server classpath 425
specifying a development database 56
updating the Web application classpath 424
specifying additional locations 50
useful patterns 246
Index 447
products overview 29
proxy 16, 229
proxy as an interface for the server 17
proxy components 16
proxy is generated 17
repository 30
reuse and portability 185
runtime project 97
Security Browser 107
server 30
site administration 100
targeted application architecture 7
Test Tool 278
utilities 135
workbench 30
VisualAge project standards 24
VisualAge version names standards 26
VisualAgeCruiseLine HTML page 380
W
WAP in the architecture 266
WAP relative to our e-business architecture 266
WapConfirmation.jsp 412
WapCruiseDetail.jsp 411
WapCruisesList.jsp 410
WapCustomerHomePage.jsp 409
Web application director structure 422
Web applications 8
Web architectures 8
WebSphere Application Server 34
WebSphere Application Server execution environ-
ment 32
WebSphere Application Server topology 285
WebSphere specific tags 263
WebSphere Studio 33
WebSphere Studio development environment 32
WebSphere Test Environment publishing page 380
WebSphere Test Environment setup 346
what is a VAP proxy 230
window menu 142
Wireless Application Protocol (WAP) 265
Workbench in general 138
workbench with Rose Bridge 316
working file 428
workspace manager 149–150
workspace menu 142
VisualAge Pacbase
for e-business
Applications
An overview of This IBM Redbook provides you with information that will
VisualAge Pacbase allow you to use VisualAge Pacbase 3.0 (VAP) to create,
INTERNATIONAL
V3 manage, and deploy e-business applications in an application TECHNICAL
repository environment. SUPPORT
Step-by-by guide to ORGANIZATION
In Part 1, we focus on the installation of VisualAge Pacbase
develop an
and the administration and use of the product. We describe
e-business
the targeted application architecture and provide an overview
application of the products, other required tools, and their integration with BUILDING TECHNICAL
VisualAge Pacbase, as well as the VisualAge Pacbase INFORMATION BASED ON
Develop JSPs and PRACTICAL EXPERIENCE
development model. We present the advantages of using the
EJBs VisualAge Pacbase proxy for e-business applications and
explain how to build a view with the proxy on the client side IBM Redbooks are developed by
of the application. the IBM International Technical
Support Organization. Experts
from IBM, Customers and
In Part 2, we develop an e-business application using
Partners from around the world
VisualAge Pacbase 3.0, WebSphere Studio, and VisualAge for create timely technical
Java. We discuss design, construction, testing, and information based on realistic
implementation. Our sample application establishes a Web scenarios. Specific
site for the VisualAge Cruise Line sample and provides a WAP recommendations are provided
to help you implement IT
version of the implementation as well.
solutions more effectively in
your environment.