Documente Academic
Documente Profesional
Documente Cultură
BluePhoenix AppBuilder 2.1.0. Document Title April, 2003 Corporate Headquarters BluePhoenix Solutions Vlierwerf 7B 4704 SB Roosendaal The Netherlands +31 (0) 165 399 401 +31 (0) 165 396 308 fax USA Headquarters BluePhoenix Solutions USA, Inc. 8000 Regency Parkway Cary, NC 27511 United States +1 919.380.5100 +1 919.380.5111 fax www.bluephoenixsolutions.com
1992-2003 BluePhoenix Solutions All rights reserved. BluePhoenix is a trademark of BluePhoenix Solutions. All other product and company names mentioned herein are for identification purposes only and are the property of, and may be trademarks of, their respective owners. Portions of this product may be covered by U.S. Patent Numbers 5,495,222 and 5,495,610 and various other non-U.S. patents. The software supplied with this document is the property of BluePhoenix Solutions, and is furnished under a license agreement. Neither the software nor this document may be copied or transferred by any means, electronic or mechanical, except as provided in the licensing agreement. BluePhoenix Solutions has made every effort to ensure that the information contained in this document is accurate; however, there are no representations or warranties regarding this information, including warranties of merchantability or fitness for a particular purpose. BluePhoenix Solutions assumes no responsibility for errors or omissions that may occur in this document. The information in this document is subject to change without prior notice and does not represent a commitment by BluePhoenix Solutions or its representatives.
TABLE OF CONTENTS
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Related Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Deployment Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 What is a Standalone Application? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 What is a Distributed Application?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 What is a Configuration?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 What is Preparation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Preparing an Application (in the Hierarchy Window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 From the Configuration Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 From the Project Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 From the Repository Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Preparing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 Using Advanced Preparation Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Rebuild Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Enabling a Group Repository for Rebuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Rebuild Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Rebuild Functionality Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 Using Rebuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Rebuilding from a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Rebuilding from an Application Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Sorting the Rebuild Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14 Saving the Rebuild Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Running a Rebuild or Rebuild Report Using the Active Configuration. . . . . . . . . . . . . . . . . . . . . 4-15 Mark All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Table of Contents
Handling a Windows Client/Server Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7 Finding the Generated Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Deploying the Client Side of an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Deploying the Server Side of an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Migrating Modules to the Mainframe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
Configuring the Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 Configuring the Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Deploying the EJB Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Configuring for EJB Deployment in WebLogic 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Configuring for EJB Deployment in WebLogic 6.0 or Higher. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Deploying EJB in WebLogic 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Deploying EJB in WebLogic 6.0 or Higher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Updating the Thin-Client Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Deploying the Partition for Thin-Client and Web Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Deploying the Servlet Partition for WebLogic 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Deploying the Servlet Partition in WebLogic 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Testing the Deployed Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9
Table of Contents
Configuring for Thin Client Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Creating an Alias (or Context) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Creating a Start Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4 Configuring the Web Client Session Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4 Setting Client Authentication with HTTP Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Using Remote Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Specifying Character Encoding for MLS Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Recreating the Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Executing an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Executing from the Construction Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Executing from the Start Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Executing from the Command Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Executing a Java Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Setting up RMI Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12 Invoking an AppBuilder Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13 AppBuilder Web Service XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13 Sample Schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14 AppBuilder Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17 Third-Party Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18 Running the Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18 Invoking an AppBuilder RMI Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19 Understanding Execution Differences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19 ObjectSpeak Event Differences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20 ObjectSpeak Property Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21 ObjectSpeak Method Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22 Differences Between Java and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22 Using Date Completion Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23 Date Completion Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23 Sample Date Completions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23
Table of Contents
Table of Contents
Table of Contents
CHAPTER
INTRODUCTION
After you have designed and developed an application, you are ready to discover the real power of AppBuilder to generate and deploy the application that may execute on a number of different environments. This guide explains how to configure, partition, prepare, verify, and deploy your application in a multi-tier environment using AppBuilder. With the integrated tool suite of the Construction Workbench, you can prepare files for a distributed application on remote clients and servers, from Windows machines to UNIX servers to mainframe hosts. This includes support for COBOL, C Language, or Java, support for Web archive deployment and remote rule execution, and support for different execution modes (converse or event-driven). Your applications can use any of a variety of end-user interfaces: program group, pull-down menu option, or command line. This guide explains how to use the AppBuilder product to handle: Configuring the Application (including partitioning) Preparing the Application (including verification) Packaging the Application (for deployment on various machines) Deploying Java on WebSphere or Deploying Java on WebLogic or other application servers Executing the Application To help you get started with the deploying process, we have pointers to Related Material. Next, we begin by introducing some Deployment Terminology. For information on deploying parts of the application on a mainframe, refer to the enterprise documentation for migrating and preparing files. Prerequisites to using these procedures include basic application development experience and familiarity with Microsoft Windows (either NT or 2000). We assume you understand distributed environments and are familiar with the concepts of distributed applications, but may not know how to implement these types of applications with the AppBuilder product. We assume that you are already familiar with developing applications with AppBuilder using the Construction Workbench. If you are not familiar with these topics, refer to the Product Concepts Guide and the Developing Applications Guide before reading this one. For information on debugging the application, whether in C or in Java, refer to the Debugging Applications Guide.
1-1
Related Material
Related Material
One of the key strengths of using AppBuilder is the ability to develop and deploy distributed applications from a single workstation. With the Construction Workbench tool in cooperation with the repositories and mainframe tools, you can take an application and deploy it to remote clients and servers at several levels throughout your enterprise. For other basic concepts of distributed application development, refer to the Product Concepts Guide. For information about mainframe migration and preparation, refer to these documents: Enterprise Administration Guide Enterprise Development Guide Enterprise Migration Guide If you would like detailed information about the capabilities of AppBuilder, you can also refer to these other documents: Information Model Reference Guide Rules Language Reference Guide Workgroup Repository Administration Guide Personal Repository Administration Guide There is some setup required that is covered in the Installation Guide for Windows (or platform you are using). On desktop and workstation machines, you configure preparation and run-time hosts during a part of the installation procedure. There is also some setup described in the Configuring Communications Guide to handle remote preparation at development time and to execute remote procedure calls (RPCs) and eventing applications at run time.
Deployment Terminology
There are many terms that are unique to AppBuilder and to enterprise-wide deployment. Before you continue with deploying an application make sure you can answer these questions: What is a Standalone Application? What is a Distributed Application? What is a Configuration? What is Preparation?
1-2
Introduction
Deployment Terminology
What is a Configuration?
Before an application can be deployed and executed, you must define within AppBuilder the configuration of the application. For a distributed application, configuration involves defining partitions, the assignments of parts of the application to various clients and servers on various machines in the network. A configuration is the way you specify how the application is to be deployed on specific machines. The settings for a Project include whether the function is standalone or distributed, and if distributed, which configuration or set of configurations apply.
What is Preparation?
When you are done developing your application and defining the configuration, you can prepare your application for the execution environment with AppBuilder. Preparation is the collection of steps that transform a humanly readable representation of actions and data into a machine-executable form. You can prepare client or server components for execution on diverse operating systems and machines against diverse database management tools. As long as you have specified a valid application configuration and installed the necessary preparation software on target machines, the Construction Workbench sends the generated code to the correct machine and compiles and links that code for the resident operating system of that machine.
1-3
Deployment Terminology
Figure 1-1
In the Construction Workbench, you can prepare application objects from either the Project tab or the Repository tab of the Hierarchy window or, if a distributed application configuration is selected, you can also prepare from the Configuration tab of the Hierarchy window. Remote preparation allows the objects you have selected to be prepared on the machine or machines on which they are executed, thus allowing you to develop on one machine and deploy on all the machines in the configuration. For Java applications, you can develop downloadable, thin-client Java applications that run on any platform that supports the Java virtual machine (JVM). This guide provides the information to deploy applications on the Java Virtual Machine. For information on developing these applications or on converting existing applications to generate Java client programs, refer to the Developing Applications Guide.
1-4
Introduction
CHAPTER
In an AppBuilder application, the project is the highest level of the application hierarchy; it contains the business function and associated configuration(s) of the application. A function represents the highest level business processthe purpose of the application. Functions contain groups of processes that subdivide the application. A configuration is how the application is to be deployed on specific machines. The settings for a Project include whether the application is standalone or distributed, and if distributed, which configuration or set of configurations apply. Before deploying the application, you must define the configuration of that application. Configuration involves defining partitions, the assignments of parts of the application to various clients and servers on various machines in the network. Use partitions to specify how the parts of the project are prepared (compiled). This section explains the procedures for configuring the application in the Construction Workbench and defining partitions using the Configuration tab of the Hierarchy window. Configuration involves: Setting Project Options Using the Configuration Hierarchy Adding Objects to the Hierarchy Adding an Application Configuration Adding a Partition Building a Partition Using the Project Toolbar
2-1
1. Select one.
There are two places where you specify whether you want to prepare for C or Java. If the project is open, then you specify it in the Project Options dialog. If no project is open, then you specify it in the Workbench Options, the Preparation tab, in the button under If no project is open. Java is generated if the Java application button is selected and C is generated if the Windows application is selected. In the Workbench Options, Preparation tab, the Application type combo box under Function prepare lets you specify different parameters for the Function prepare. For example you may want to create desktop objects for C and append functions on the menu for Java. For more information on the Workbench Options, refer to the Development Tools Reference Guide.
2-2
Select if you want to prepare the rules locally that would go to the mainframe or just check syntax.
In that same dialog, select the application type (Java or Windows). Select the type and name of the database and if there is security, enter the logon information. Include Mainframe Rules When using an existing application that contains rules that execute on a mainframe and you want to prepare the entire application locally to test the business logic, select the Include Mainframe Rules. This allows you to prepare the application including those rules that usually get prepared on the mainframe; however, certain rules, including mainframe database rules, cannot be prepared locally. If you deselect this choice, the system only checks the syntax of the mainframe rules (and provides warnings) but does not prepare them. Click OK to accept any changes. For more information about standalone application development, refer to the Developing Applications Guide.
2-3
Select the Application Configuration from the drop-down list then select the partition from the available partitions of that configuration.
Within the Construction Workbench the project must have a configuration that designates the clients and servers of the system by defining them in partitions. Use the Configuration tab in the Hierarchy window to define the application's configuration. You build the configuration hierarchy by adding objects and defining the properties of these objects. A project may have several configurations.
2-4
The appearance of the hierarchy in the Configuration tab is different from the view of the hierarchy in the Project tab. You can explore the content of the partitions until you find a rule that is a frontier rule of another partition of the same application configuration; those rules are marked with a special icon and cannot be expanded.
Note
To turn off the object type (only show the icon and the name) in the Configuration tab, go to Tools > Workbench Options and select the Hierarchy tab and deselect Display object types.
A rule may appear to belong to both the client partitions process and the server partitions server, but it is subtracted from the client process and is built only on the server. The order of preparation is to consider the client partition first and include all the rules underneath it in the configuration scheme and then subtract the rules that appear in the subsequent server and client partitions.
Figure 2-5 Typical configuration procedure
Step 3. For the Client Partition: Set partition properties to Client. Add a Machine and a Process container.
Step 4. For the Server Partition: Set partition properties to Server. Add a Machine and a Server container. Step 5. Add Rules.
2-5
This involves creating a configuration from scratch. To create a configuration from rules that already exist in the repository, when you insert a rule, choose the rule from the Insert (Query) window by its name in the repository. Click Insert. As you build the configuration and add objects, commit the changes to the repository. While you work on the configuration, the changes are not saved to the repository until you click File > Commit (or select the Commit button on the toolbar). When you commit, the entire set of changes are made to the repository, both for object properties and relationships between objects.
Figure 2-6
Application Configuration
Partition
Server
Database
Rule
2-6
2-7
Adding a Partition
Adding a Partition
Partitions allow you to specify the information about the platform on which your application runs. Partitions define the associations between a client or server (or gateway) and its associated machines or databases. Each partition must be associated with an application configuration. For more information on building a partition by adding machine, process, and server objects, refer to Building a Partition. Client partitions Client partitions contain the projects processes to execute on the client-side. When you add a process from the projects hierarchy to the configuration, AppBuilder automatically includes all the necessary child objects (for example, rules, views, etc.). In addition, the client partition includes a machine object that indicates the clients execution environment. Server partitions Server partitions include a server object. This partition defines the type of server (for example, an EJB server). In the server partition, insert the rules that execute on the server-side. Gateway partitions - Gateway partitions forward client requests to a server partition running in the same or remote server. The Gateway partition should include an AppBuilder server object with all the associated rules. This server object should be the same as the one defined for the remote server as the gateway partition is forwarding requests for the same frontier rules. For preparation, select the specific configuration or partition to prepare. You can do this in several ways: directly from the Configuration tab by highlighting the partitions or configuration to prepare from the Project Options dialog box (as in Figure 2-3) by selecting the partitions or configuration to prepare from the drop-down lists of partitions and configurations in the Project toolbar For a gateway partition, the icon in the hierarchy distinguishes it from server partitions as shown in Figure 2-8.
Figure 2-8 Gateway partition in hierarchy
For a gateway, only frontier rules are listed and are shown with a different Rule icon, one with an I over it.
2-8
Building a Partition
Building a Partition
A partition contains the information about the machine on which the business logic is prepared and about which rules run on that machine. So a client partition has a machine object (to specify the machine that the client runs on) and a process object (to specify which part of the client application runs on that machine). There may be more than one process object for a partition. The machine object identifies the specific physical machine in the network, while the process object contains the rules that run on that client. Similarly, a server (or gateway) partition has a machine object and a server object. The server object contains the rules that run on that server. (For a gateway, only the frontier rules are specified.) These rules are excluded from the rules on the clients. The rules designated as belonging to the server are then subtracted from the rules in the process in the client application configuration. A database object (no more than one) can be attached to a partition to specify the database type and the database name. Building a partition consists of these tasks: Setting Partition Properties Associating Physical Machines Configuring for Remote Mainframe Preparation (for preparation to the mainframe) Adding a Process Container Adding Rules to a Process Adding a Database
2-9
Building a Partition
Select whether this partition is for client or server. If client, select type. If server, select interface for communication. Select the language of the generated code.
Caution
If the Server Interface is EJB, the package name (in the Package field) may be mandatory. This depends on which application server you are using. Some application servers (like WebSphere 3.5) require a package name for preparing EJBs, and if the package name is not supplied, an error occurs at deployment time. Check the application server documentation to find out whether a package name is required.
Select the following properties based on the type of platform on which the application executes.
Table 2-1 Platform Java client Web (HTML) client Windows client EJB server (Windows) C server RMI server Web service EJB gateway Web service gateway Configuration summary Partition Type Client Client Client Server Server Server Server Gateway Gateway Client Type EventDriven HTML Converse N/A N/A N/A N/A N/A N/A Server Interface N/A N/A N/A EJB NetEssential RMI Web service EJB Web service Language Java Java Default Java Default Java Java Java Java
2-10
Building a Partition
Select the operating system. Enter Local to prepare this partition on this workstation.
2-11
Building a Partition
Note
Partitions (Configuration Units) are used differently for preparation when using the mainframe workbench. On the mainframe the preparable entity is added directly to the Partition. To use partitions on the mainframe, refer to the Enterprise Development Guide. Example remote preparation hierarchy
Figure 2-11
For each of these parts of the hierarchy, properties must be set. The following settings are the required configuration on the workstation for the application. Additional settings are required in the workbench option settings. Refer to Setting the Workbench Options in Chapter 5, Preparing to the Mainframe. The only configuration necessary on the mainframe side is the installation of the Enterprise Remote Preparation Server, described in the Enterprise Installation Guide. For more information on performing a remote prepare to the mainframe, refer to Chapter 5, Preparing to the Mainframe. Setting Partition Properties In the Partition properties, set the Partition Type to Server, the Server Interface to NetEssential, and the Language to Default.
Figure 2-12 Partition settings
2-12
Building a Partition
The following fields can also be used to override the default version settings. Collection ID Server owner Server qualifier Minimum trans ID Maximum trans ID The order of precedence is similar to the mainframe, but the relationship between the partition and the preparable object is not supported on the workstation. Setting Database Properties If you are using a database (and DB2 is the one supported for the mainframe), in the Database properties, set the Type to DB2.
Figure 2-13 Database settings
AB20.USER.APPLDBRM
Set the Database directory path to the path where the database (DBRM)s are stored following a successful prepare. If nothing is entered, the system defaults to the library specified in the system version INI file. Set the Implementation name to the DB2 Subsystem ID. Setting Machine Properties The Machine properties must point to the Region that the object rule is running against (CICS or Batch). Each Region must have a mainframe INI file in the mainframe repository libraries that the remote preparation is running against.
Figure 2-14 Machine settings
Set the Operating system to either MVS or CICS/MVS. The CICS/MVS option is only used for preparing CICS rules. You cannot currently prepare MVS rules when the objects are set to this environment. Set the Machine group to the name of the region on the mainframe, for example a CICS region. Set the Implementation name to the TCP/IP host name of the mainframe.
2-13
Building a Partition
Note
Use the Machine group name to create a remote preparation machine entry in the workbench options. Refer to Setting the Workbench Options in Chapter 5, Preparing to the Mainframe.
Rules use the Machine properties Operating system as the execution environment. If a CICS rule needs to be prepared, the Machine must specify an operating system of CICS/MVS and a Region name as CICS Region. The DB2 information contained in the Database object is used not the information in the Rule.
2-14
Building a Partition
Note
Application preparation fails if the leaf-level view does not include at least one field. That is, though a view can refer to any number of subordinate views, eventually the hierarchy must end in at least one field for all superior views to be valid.
In the Hierarchy diagram, the rules in a process that are logically part of that process but physically run on part of another partition (located on another machine) are displayed with an icon that distinguishes them from rules that are on that machine, as shown in Figure 2-15.
Figure 2-15 Rules icons
2-15
Building a Partition
Adding a Database
To add access to a database, add a database object to a partition object in the Configuration tab of the Hierarchy Diagram in the Construction Workbench and set the following properties in the database object. Implementation name - this is the JDBC or ODBC connection name. Type - this determines the exact SQL that is output when the object is prepared. For database type, refer to Table 2-2. These table entries are valid when the Language setting for the partition is set to Default, that is, the native language (C or COBOL). For Java (Language set to Java), the only valid database settings are DB2/UDB and Oracle.
Table 2-2 Type DB2/2 DB2/400 DB2/600 DB2/UDB MS-SQLServer Oracle Database types Description for IBM UDB platform for IBM OS/400 platform (AS/400, iSeries) for IBM AIX platform (RISC 6000) for IBM UDB platform for Microsoft SQLServer database for Oracle database
Under the database object in the hierarchy, you may put the file objects to make clear to you which tables in the database are needed, but the files should also be under the rule in the partition. The file object in the hierarchy corresponds to the table of the database; the view object in the hierarchy corresponds to the column in the table. For more information about setting up access to a database, refer to the Developing Applications Guide. For client applications that use an EJB to access a database, you must create a database connection for the application server.
2-16
To turn off the Project toolbar, go to View> Toolbars and deselect the Project toolbar check box.
2-17
2-18
CHAPTER
This topic explains the procedures for preparing the application objects after the partitions are defined and the servers and clients are configured. In the Construction Workbench, you can prepare application objects from either the Project tab or the Repository tab of the Hierarchy window or, if a distributed application configuration is selected, you can also prepare from the Configuration tab of the Hierarchy window. This section explains how the preparation is done; the results are discussed in a separate section. This process involves: Understanding Preparation Preparing an Application (in the Hierarchy Window) Preparing Objects Re-Preparing Items with a Preparation List Considering Background Processing Interpreting the Results (Output) Using Advanced Preparation Options You can prepare from any of the hierarchy tabs and from most of the tools that manipulate preparable objects. The objects are prepared using the Application Configuration and the Partition specified in the Project options, unless you prepare them from the hierarchy diagram and an object has both an Application Configuration and a Partition as parents. This is true for the Configuration tab, but if you copy the Application Configuration from the Configuration tab to the Repository tab you get the same results. In a sense, the application hierarchy and configuration hierarchy are maps used by the system to understand how to prepare the objects. When an AppBuilder application is prepared, the following items are located and extracted from the repository, compiled, and otherwise made ready for execution: Functions and processes (application structure) Supporting rules (code) Objects defined within windows (including the windows themselves) Views and fields (data structures)
3-1
Understanding Preparation
Understanding Preparation
Depending on the deployment and execution environment, preparation may include these steps: Create any database tables if database access is required Prepare any external files used by a rule Windows are prepared when you submit a window (for C client) or when you submit rule for preparation (for Java client) Transform rules and groupings of rules into an executable program Compile source code for any external code components used by a rule Prepare any sets that the application uses Make available to the run-time environment the menus, shortcuts, windows, and workstation reports that comprise the application end-user interface Prepare mainframe rules for test execution on the workstation or check the syntax of those rules Be sure to commit changes before preparing the application. You can prepare the entire application or individual application objects. To understand preparation, you should read: Knowing Ways to Prepare Meeting Java Preparation Prerequisites Avoiding Common Mistakes Preparable Objects Generated Output Language
3-2
Understanding Preparation
3-3
Understanding Preparation
Preparable Objects
In an AppBuilder application, objects must be prepared to make them executable. Different preparation options are available depending on the type of object in the application hierarchy. For each type of object, whether they can be prepared or super prepared or both, the result of preparation, and what tabs you can prepare from are summarized in Table 3-1. The Prepare choice prepares only the selected object; SuperPrepare prepares the selected object and all of its children (at a lower level in the hierarchy). Some objects, like partition have other preparation actions available.
Table 3-1 Object preparation summary Super Prepare Yes Other Action
Object
Prepare
Results of Preparation Action Serves as a container of partitions and is shown in the Configuration tab, not the Project tab. Can only super prepare. Prepares all children (clients and servers) and creates package. If you only Create Package, then it packages previously prepared items. Deploy Package calls a user defined Deploy.bif script in order to deploy prepared package Generates the pull-down menu structure in the execution client or the desktop object (Start > Programs > folder name). Serves as a container for rules and other objects on the client (so nothing to Prepare, only Super Prepare). Generates the command in the pull-down menu in the execution client.
Application No Configuration
Partition
No
Yes
Function
Yes
Yes
Process
No
Yes
Server
No
Yes
Serves as a container for rules and other Configuration, objects to be prepared on the server Repository, and (so nothing to Prepare, only Super Prepare). Inverted tabs. Compiles the rule (or transforms it into an All hierarchy tabs; executable program) in the run-time directory open window in on the designated machine. Rule Painter. Creates the window (panel file) for C. In Java, nothing happens; the HTML and JavaScript are generated when the rule that owns the window is prepared. Generates DDL (data definition language) statement. The DDL can be used to create a table in the database. Generates the sets. Extracts and transfers the bitmap. Bitmaps and icons are converted to JPGs when you prepare for Java. JPGs are converted to Windows bitmaps when you prepare for C. Compiles the user-defined component (or transforms into an executable program) in the run-time directory on the designated machine. Do not prepare a Java component in a C partition. Reports can only be directly prepared from the mainframe. To prepare a report in Java, prepare the rule that has the report. Project and Repository tabs; open window in Window Painter. All hierarchy tabs. All hierarchy tabs. Create/ Delete Table
Rule
Yes
Yes
Window
Yes
No
File Set
Yes Yes
No No
Bitmap
Yes
No
Component
Yes
No
Report
Yes
No
N/A
3-4
Understanding Preparation
Preparation Order You can prepare objects in any order with these exceptions: Prepare a rule or user component that accesses a database after creating the table for the corresponding file. For Java partition, you can have a C user component. For a C partition, the Java user component is not prepared. If you create a table that is part of a file, be sure to prepare both the file and prepare the table objects. Similarly, you may prepare individual objects, but be sure to prepare the entire function (or group of objects) that you wish to run to make sure that the function (or group of objects) is ready. If changes are made to a window and the window has a view attached, be sure to re-prepare the rule that has that window. For Java, if changes are made to a window, you must re-prepare the rule that owns that window. System components are not prepared. Their functionality is built into the runtime. Create and Delete Table For a file object, Create Table uses existing DDL files to create a table for the selected file. If DDL files do not exist for the selected files, Create Table generates them and creates tables for the files. In other words, you can skip the Prepare step. New tables cannot be created for files until existing duplicate tables have been deleted. A status of Successful in the Prep Status tab of the Output window means that the files corresponding table has been created successfully. For a file object, Delete Table deletes existing tables for the selected file. Super preparing a function does not create database tables for the files in the function hierarchy. Create the table with the Create Table action. If you have problems preparing files, check that you have specified the Implementation Name property of the file (which determines the name of the corresponding database table) and of the fields in the file view (which determine the names of the corresponding columns in the database table). Embedded SQL Embedded SQL is supported for Java rules as it is for other rules created by AppBuilder. When you prepare the rule, the system generates the appropriate SQL for Java (or SQLJ). That is, the original rule is converted to Java code with the SQL embedded in it. The system uses the industry-standard SQLJ translator as a precompiler to complete the translation to Java. Consequently, the SQLJ basis in JDBC (Java Database Connectivity) allows rules created by AppBuilder to access any JDBC-compliant database.
3-5
Understanding Preparation
3-6
Selecting the two partitions in one configuration by clicking and holding down Ctrl key.
Right-click and select Super Prepare (or choose Build > Super Prepare) to perform preparation of both partitions and all their child objects.
Process and Server objects are only containers for rules and other objects on the client and server respectively, so there is nothing to prepare except the objects it contains. These have only the SuperPrepare option. Other objects, like Window, Set, and Bitmap, do not contain objects that are preparable, so no SuperPrepare option is available. Some objects, like Symbols, Fields, and Views, are not preparable. When you prepare a remote client or server rule, the generated code for the rule is copied to a preparation server machine, then compiled and linked for the operating system residing on the machine. Other objects in the rule hierarchy are prepared in similar fashion. Be sure to commit changes before preparing the application. You can also prepare some objects From the Project Tab or From the Repository Tab.
3-7
The Distributed Application radio button must be selected in order for the Configuration and partition selection to work in the Project tab. The selection of a partition applies only to the preparations performed from the Project tab. From the Project Options dialog, if only one partition is selected, then only objects in that partition can be prepared in the Project tab. A Super Prepare only prepares up to that partition and a Prepare can only be done for objects in that partition. From the Project tab, if you select a rule in another partition, a message appears in the Output window. That partitions selection applies only to the Project tab. (If you want to prepare more than one partition or entire configuration, then you should perform a preparation from selecting those from the Configuration tab. Refer to From the Configuration Tab.)
3-8
Preparing Objects
Preparing Objects
Preparing Individual Objects with a Preparation Query
There are several ways to select the parts of the application to be prepared. In the Configuration tab of the Hierarchy window, you can select the objects in the configuration and do either a Prepare or SuperPrepare. Another way is to bring up a Preparation Query window and select the objects from a list that is created by querying the repository of objects. With the function selected, from the right-click menu, you can bring up a preparation query for an object. Which objects appear in the menu depend on which tab you are in and which object you have selected. Figure 3-3 shows how to select a preparation query for an object from the menu. Figure 3-4 shows the Preparation Query window.
Figure 3-3 Menu selection of Preparation Query
Figure 3-4
1. Select the type of object type when you select Preparation Query. 3. Select which of the objects in the repository for a given configuration and partition to prepare, and click Query. 2. Select whether to prepare the objects locally (standalone) or distributed. If standalone, select only those in this Project or in the entire repository. 4. Click Prepare (to do only the rule) or SuperPrepare (to do everything underneath it in the hierarchy).
3-9
Preparing Objects
3-10
3-11
3-12
CHAPTER
The Rebuild facility is available from within Construction Workbench when connecting to a Rebuildenabled Workgroup Repository. Rebuild is only supported for Workgroup Repositories on Windows 2000 platforms and Microsoft SQL Server 2000. Rebuild allows you to perform a rebuild of an application, in conjunction with an Application Configuration or Partition, that selectively updates and rebuilds only those objects impacted by a particular change. The rebuild facility updates a record each time an object is prepared for a particular Application Configuration or Partition.
Rebuild Overview
Workgroup Rebuild is designed to assist with change management in a development environment. During development you need to manage all of your source code and track your changes. In addition to managing your source, you will need to manage change in the executable application itself. With rebuild, you can know what executables are effected by your changes and only build what is required without having to do extensive analysis on your changes. The analysis normally required is done automatically when you are connected to a Rebuild enabled Workgroup Repository. By properly partitioning applications, you can rely on AppBuilder to tell you what needs to be Prepared. For instance, if an application is deployed in Java on the client, and COBOL on the server using CICS, you can set up an Application Configuration (APPCFG) to partition the application into two logical pieces. You can create one partition for the client and configure it to prepare Java locally, and one partition for the server and configure it to prepare remotely to the target CICS region. Once this configuration is in place, you can build the application for the first time and start tracking the rebuild status of the objects.
4-1
Rebuild Overview
Figure 4-1
Rebuild Analysis
Rebuild Analysis happens in a 3 phase process as shown in Figure 4-2. Part of the processing happens when you commit your changes to the repository. The remaining processing occurs when the user requests a rebuild action. 1. 2. During development, the changed objects are identified and stored in a change list. During rebuild analyze, impact analysis is performed to determine which additional objects need to be prepared. Each object that requires prepare causes an update in the Impact list to the impact time. During the partition analysis, every object in the selected Application Configuration or Partition is checked against the Impact list to see if it has been prepared since the last impact.
3.
4-2
Rebuild Overview
Figure 4-2
Rebuild Overview
4-3
Rebuild Overview
Changed List
Table 4-1 Field Object ID Version ID Impact type Changed List Purpose To relate this back to the effected object To scope this to a specific version Whether this is Source only change or other special circumstances.
Impact Analysis
During rebuild analyze, a full impact analysis is performed to determine which additional objects need to be prepared. Each object that requires preparation is added or updated in the Impact List table with the impact time. Impact List
Table 4-2 Field Object ID Version ID Impact time Impact List Purpose To relate this back to the effected object To scope this to a specific version To track the time that the object was last impacted.
After the analysis is complete at Phase I, the objects are ready for rebuild. When an object is rebuilt, the rebuild time of the object is compared to the impact time of the changed object in the Impact List, and is prepared only if the rebuild time is different than the impact time. The impact time is then updated if the object is prepared successfully. However, the location of the rebuild in the hierarchy when it was selected effects which objects are eventually prepared. Impact Analysis Examples Impact analysis determines which objects are effected by a specific change or set of changes. For example, a rule might be effected by changing a field in a view of a child rule. However, a source change to a child rule does not effect a parent rule. Every impacted object is added to the impact table. *** = changed @ = impacted Figure 4-3 illustrates how a change to a field impacts the rules associated with it.
Figure 4-3 Field Change
4-4
Rebuild Overview
Figure 4-4
Partition Analysis
When the impact analysis is complete, the results represented in the impact table are used to determine which objects within a partition will be rebuilt.
4-5
Rebuild Overview
Partition Analysis Example In the following example, Partition 1 and Partition 2 are server partitions that contain different sets of objects. If a single change is made to Field 1, both Rule 1 and Rule 2 are added to the impact table. However, if only partition 2 is rebuilt, then only Rule 2 will be built, as Rule 1 is not in Partition 2. If Partition 1 is then built after Partition 2, not only will Rule 1 be built, but Rule 2 will be built again because it has not yet been built for that specific partition.
4-6
Rebuild Overview
Figure 4-5
Partition Example
4-7
Rebuild Overview
Significant Objects
Table 4-4 Significant ObjectsTable Attributes System Id Type Implementation Name Impacts Report Rule Window Objects/Relationships Bitmap
Component*
System Id Name Execution Environment Language Subroutine DBMS Usage Implementation Name
Component Rule
File
Component Rule
Field
System Id Name Field Picture Storage Field Picture Display Screen Literal Long Field Format Field Length Field Fraction Range Minimum Value Range Maximum value Reference Table Name
View
4-8
Rebuild Overview
Table 4-4
Form**
Report
Help**
Window
Help Text**
Window
Panel**
System Id. Name Coordinate System X-Resolution Y-Resolution Description Country Language Base GUI
Window
Physical Event
Rule
Report
Report Id Name Execution Environment Page Size Line Size Left Margin Top Margin
Report Rule
4-9
Rebuild Overview
Table 4-4
Rule*
System Id Name Execution Environment DB2 Plan Name DBMS Usage Execution Mode CICS/IMS transaction Id Implementation Name Package Isolation Mode
Rule
Section
Report
Set
System Id. Name Field Picture Storage Set Format Set Length Set Fraction Implementation Name Style Representation Length
Symbol
Set
Values
Set
View
4-10
Rebuild Overview
Table 4-4
Window Content**
Window
Report/Section
Type Break Sequence Number Page Placement Break Field Break Qualifier Left Margin Print Option
Report
Set/Value
Set
Entity/View
Usage
View/Entity
Field View
4-11
Using Rebuild
Using Rebuild
The following procedures are listed in this section: Rebuilding from a Partition Rebuilding from an Application Configuration Sorting the Rebuild Report Saving the Rebuild Report Running a Rebuild or Rebuild Report Using the Active Configuration Mark All
Figure 4-6
Project Tab
Configuration Tab
2.
When you select Rebuild while in the Project tab, the default APPCFG and PARTITION will be submitted for rebuild. The items that are selected in the hierarchy have no impact on what is rebuilt.
4-12
Using Rebuild
From the Configuration tab, You have to select the APPCFG or PARTITION that you want to rebuild, rebuild report, or mark All. Procedure - Running the Rebuild from Project or Partition You can conduct a Rebuild from either of two views in Construction Workbench: from the Project tab or from the Configuration tab (Figure 4-6). Running Rebuild from Project View: 1. 2. Select the repository partition (item in hierarchy) that you want to rebuild. Select Build>Rebuild (Figure 4-7).
From the Project tab, you can only run a rebuild when you are in Distributed Mode. Chose File>Project Options and Select Distributed Application.
Note
3.
The Rebuild status will display in the status box located at the bottom of the Construction Workbench window.
Project Tab Rebuild
Figure 4-7
Running a Rebuild Report on a Partition 1. 2. 3. 4. Select the partition using the options in the drop-down box at the top of the Construction Workbench. Select the object you want to obtain a rebuild report for from the hierarchy. Select Build>Rebuild Report (Figure 4-7). The report results display in the spreadsheet columns at the bottom of the Construction Workbench window.
4-13
Using Rebuild
Running Rebuild from an Application Configuration 1. From Construction Workbench, select the Configuration tab (Figure 4-8).
Configuration Tab Figure 4-8
2. 3. 4.
Select the Application Configuration you want to rebuild. Choose Build>Rebuild, or right-click on the Application Configuration name and select Rebuild. The status window in the lower left corner of the window displays the status of the rebuild (Figure 4-9).
Rebuild Status Display
Figure 4-9
Running a Rebuild Report on an Application Configuration 1. 2. 3. Select the Application Configuration using the options in the drop-down box at the top of the Construction Workbench. Select Build>Rebuild Report (Figure 4-7). The report results display in the spreadsheet columns at the bottom of the Construction Workbench window.
4-14
Using Rebuild
Figure 4-10
Mark All
Select Mark All>Unprepared to clear the rebuild status so that all the objects in the Partition will be selected and prepared in the next Rebuild. When an APPCFG is selected, the Mark All operation will effect all child partitions of this APPCFG. Use Mark All>Prepared to cause all of the objects in the selected partition to be marked as prepared. If a rebuild is performed on the partition directly after marking All Prepared, no objects will be detected as requiring rebuild. Changing the rebuild status is most useful when making significant changes to the way an application is deployed or when you are deploying an application for the first time.
4-15
Using Rebuild
4-16
CHAPTER
This topic explains the procedures for preparing the application objects remotely from the workstation to a mainframe. In summary, from the Construction Workbench on the workstation you set the configuration and tell AppBuilder which entities are to be prepared on the mainframe. When preparation is performed, AppBuilder invokes the Enterprise Preparation Server. This server performs data extraction from the workstation and sends the data to the mainframe where it is processed in a batch job. This process involves: Using Supported Entities Installing and Configuring the Server Configuring the Partition Setting the Workbench Options Seeing the Results
Caution
Remote preparation to a mainframe is a feature that should be used only for development. It is not intended for use in QA or production environments. It does not use the safeguards that mainframe prepare and rebuild use. It does not update the repository, entity, or status tables. We also recommend that you use a separate repository version on the mainframe, as it does update the version data sets.
Note
The ENT_METHOD_STATUS table is not updated with the remote preparation to the mainframe. We recommend that you have a separate repository version on the mainframe to use for remote prepares. Then you do not have a conflict with others using the same repository.
5-1
For CICS rules, a transaction assignment is the function that assigns transaction codes to CICS to allow execution in the respective transaction processing environments. For remote prepare these transactions are stored in a VSAM file, so when the rule is prepared again, the rule uses the same transaction. Currently, DB2 packages are supported, but plans are not supported. If your settings, PKLIST and PCKG, are set to use plans, the preparation and execution results could be unpredictable. For user components, the supported languages are COBOL, PL/I, and Assembler. Subroutines are supported for COBOL and PL/I components. File prepare only works for existing DB2 tables. As it does on the mainframe, AppBuilder creates a DCLGEN member for PL/I, COBOL, and C.
5-2
ne20
For each (remote) machine, specify various other parameters that depend on the machine and platform.
Remote preparation tab parameters Description For a remote preparation, you must specify parameters for two machines, local workstation and remote or destination machine. This area specifies information about the local workstation. Specify the current local machine name for the workstation. If you are using a loopback adapter, you can specify your IP address instead of the local machine name. Specify the name of the results server, which is the port number that the AppBuilder system service uses to communicate the results. For a remote preparation, you must specify parameters for two machines, local workstation and remote or destination machine. This area specifies information about the remote or destination machine. For the destination, you can add several remote machine names to the list and specify different server names and user identifiers. For each mainframe CICS or Batch region, create one machine name using the same name as the Machine group name specified in the properties of the machine associated with the partition in the repository. (See Configuring for Remote Mainframe Preparation in Chapter 2, Configuring the Application.) For remote prepare to UNIX and Windows, you would use the Implementation Name of the machine. Select the destination platform. For remote preparation to the mainframe, select Mainframe. This displays several more fields that must be specified to accurately setup communications with a mainframe. Select the preparation server ID, which is by default ne20. The rest of the fields are necessary for logging in to a mainframe. This represents the port number that the Enterprise Preparation Server is running on the mainframe.
Remote
Machines
Platform
Preparation Server
5-3
Table 5-1 Field User ID and Password Repository and Version and Code page
Remote preparation tab parameters (Continued) Description Fill in the user ID and password. (For remote preparation to the mainframe, use the mainframe user ID and mainframe password.) For remote preparation to the mainframe there are some additional fields. Specify the name and version of the repository to which the files are to be prepared, specified in the @HPSENV INI file on the mainframe. Select the code page from the drop-down list.
If you are using a loopback adapter, you can specify your IP address instead of the local machine name on the Remote Preparation tab. Click Apply to apply the changes but leave the dialog open; click OK to accept the changes and close the dialog.
5-4
For most of the types of object prepared to the mainframe, the libraries specified by the USRVQUAL variable in the Qualifiers section of the @USERENVn INI file are updated. As in a typical mainframe prepare, the results contain several files including the compiler listing and link listing. Due to the size of these files, an INI setting on the mainframe, REMPREP.SNDLIST in the @USRENVn INI file, is defaulted to 'N', so these files are not sent. If you would like these files sent, set the INI setting to 'Y' for the repository and version to which you are preparing. When done with configuring the entities and installing the server, refer to the Enterprise Application Guide for more information about preparing applications on the mainframe in general and handling remote preparation to the mainframe in particular. Nothing is required for configuring the mainframe beyond what is described in the Enterprise Installation Guide for installing the Enterprise Remote Preparation Server.
5-5
5-6
CHAPTER
This section explains the procedures for handling the application objects that are created as a result of the preparation process and the procedures for deploying them on various platforms. The procedures for preparation were discussed earlier; this section discusses the results of those procedures. For some preparation, such as rules created in C to run on a Microsoft Windows (either NT or 2000) machine, you can prepare the rules remotely, from the development workstation to the remote machine. But with Java and EJB modules, the preparation only prepares the files locally. The following lists the options for deploying an application: Handling a Standalone Application Handling a Thin Client (HTML) Application Handling a Java Application Handling a Windows Client/Server Application Migrating Modules to the Mainframe When AppBuilder prepares the application, files are generated in an ordered set of directories on the local workstation. For standalone applications, whether C or Java, all the files are stored on the local workstation. For remote prepare, some files are generated on remote machines; however, files are not always generated remotely. For Java (thin or thick client) applications, files are generated on the local machine and must be deployed separately. For C applications, files can be remotely prepared. For deploying to the mainframe, files must be migrated from the workstation to the mainframe. Each of these cases is considered and the location of the generated files is detailed.
6-1
6-2
6-3
Figure 6-3
The contents of the various subdirectories in the run-time directory are summarized in Table 6-1.
Table 6-1 Directory contents for Java files Description of Contents DDL is copied here (to create a table based on this). Subdirectory DBM LOCAL MENU *.MNU, *.FNM files are copied here.
6-4
Preparing a partition generates and extracts Java classes, HTML, and bitmaps etc., for the selected partition. The main run-time directory for an Application Configuration in the install directory is a Java\RT directory. For example, if the Application Configuration is named Config1 and within that is a partition named ClientPart1, the path of the files is: <AppBuilder>\Java\RT\Config1\ClientPart1 Within that directory, there are subdirectories: html - for HTML, CSS and JavaScript files, images - for bitmap files When the partition is super prepared, an archive file with the name of the partition is created. This archive file can be copied on to the servlets home directory. The generated JAR file of a partition resides in each directory associated with the current application configuration object, under the <AppBuilder>\Java\RT directory. The name of the JAR file is the name of the Partition that has been super prepared.
Note
If you change the name of a partition, AppBuilder creates a new directory structure at the next prepare on the new partition. (The RT directory also contains the old files; there is no mechanism to adjust or delete directories upon partition name changes.)
During preparation, AppBuilder creates the HTML files for a Web application. You must compile and deploy them on the client as necessary. The HTML files and the associated CSS and JavaScript files are extracted from the repository and placed in the RT (run-time) directory. HTML is generated to the main partition directory. If the HTML file is not created for a given window panel, the HTML generator is called to create HTML, CSS, and JavaScript files and copied into the run-times partition directory. The HTML files can reference any multimedia file or other file type and these referenced files can be saved in the repository and prepared. These miscellaneous files can be saved under a folder associated with any specific window or globally with the function. These files are extracted from the repository and copied to the includes subdirectory under the run times HTML directory.
6-5
6-6
6-7
The contents of the various subdirectories in the run-time directory are summarized in Table 6-2.
Table 6-2 Directory contents on Windows platform Description of Contents Bitmap files Prepared components files DDL (to create table based on this) Native operating system help for some system component s (The location is in the appbuilder.ini setting GUI_HELP_DIR.) AppBuilder-generated online help files Menu bar Window (panel) files Only for debugging. When running RuleView, this set of configuration files (with .CFG extension) are used to find out the hierarchy of the objects. Prepared set executable Client-side run-time rules DLLs (See SERVER for server run-time rules DLLs.) Source code for rule Script files for access to mainframe Server-side run-time rules DLLs (See RULEBIN for client-side run-time rules DLLs.) Subdirectory BMP CMPBIN DBM GUIHLP HLP MENU PNL PROCESS REF RULEBIN RULESRC SCRIPT SERVER
6-8
Tip
Figure 6-5
With hashing turned on, AppBuilder creates subdirectories in the rulebin directory for easy reference to find the files needed for large applications. Directory structure for rules with hashing set
6-9
6-10
CHAPTER
With AppBuilder, you can develop, deploy, and test enterprise applications targeted for Java environments. This may include a servlet or an Enterprise Java Bean (EJB) or both running on an application server. This section describes the procedures to deploy and run these parts of an application on the IBM WebSphere application server (either version 3.5 or 4.0). This set of procedures assumes that you have WebSphere on your development machine along with AppBuilder. The procedures are (depending on which version of WebSphere you are using): Configuring the Initialization Files (with WebSphere as the application server) Configuring the Application Server Deploying the EJB Partition (the EJB part of the application) Updating the Thin Client Archive Deploying the Partition for Thin Client and Web Services (the HTML part or Web service part of the application) Testing the Deployed Application on WebSphere The configuring procedures apply to any implementation involving WebSphere. If you only need the EJB implementation, follow procedures for updating and deploying the EJB. If you only need the servlet implementation, follow procedures for updating and deploying the servlet. If you need both the servlet and EJB parts of the application, follow all the procedures. These instructions assume you have WebSphere installed. For more information about WebSphere configuration and operation, refer to the WebSphere documentation (http://www-4.ibm.com/software/ webservers/appserv/library.html). An application with database access generated for WebSphere 4.0 also requires UDB 7.1 with FP3 or UDB 7.2. DB2 should be configured to use JDBC 2.0. Be sure also to put on the latest fix pack for Internet Explorer. As well, be sure to install the latest Internet Explorer fix pack. These instructions use the following conventions for directory names: WebSphere is the name for the drive and directory where WebSphere is installed (for example, c:\WebSphere\AppServer). AppBuilder is the name for the drive and directory where AppBuilder is installed (for example, c:\AppBuilder). Database is the name, if you are using a database, for the drive and directory where IBM DB2/UDB is installed (for example, c:\SQLLib).
Note
Remember that application servers are case sensitive. Be sure to double-check any commands or URLs typed at a command prompt, in a command file, or in the entry fields in the interface.
7-1
Figure 7-1
Select the specific application server from the drop-down list. This is equivalent to setting the value in the hps.ini file.
WebSphere
Or you can modify the AppBuilder system initialization file (AppBuilder\hps.ini) so that the selected application server is WebSphere. In the AP Java section, uncomment or change the APPLICATION_SERVER value and comment out or remove the lines for the other servers. For example, APPLICATION_SERVER=WebSphere ; APPLICATION_SERVER=WebLogic
Note
3.
The value WebSphere works for WebSphere version 3.5. If you are deploying WebSphere 4.0, use the value WebSphere40 instead.
For thin clients, the generated partition includes an HTML start page and an error page, both generated from a default template. The default template can be overridden by setting the path to the new template files by setting the values in the system initialization file, hps.ini, using: THINCLIENT_START_HTML=c:\defaultstart.html THINCLIENT_ERROR_HTML=c:\defaulterr.html where defaultstart.html and defaulterr.html are the names of template files.
7-2
Note
The default templates, svlt-startpage.htpl and svlt-errorpage.html, are in: AppBuilder\AD\CFG\DATA The start page template is assumed to have the following entry: <form method="get" action="$(SVLTCLS)"> where $(SVLTCLS) gets replaced by the generated action target. The error page template is copied as is during prepare. You may use any or all of the following lines in the error page to get more information displayed. <input type="text" name="LVEL_ERROR_CODE" size="20"> <input type="text" name="LVEL_ERROR_DESC" size="77"> <textarea rows="8" name="LVEL_ERROR_CONTEXT" cols="78"> </textarea> The keywords are replaced by AppBuilder during execution if an error is encountered. The code (LVEL_ERROR_CODE) is a number representing the error. (Refer to the Messages Reference Guide.) The description (LVEL_ERROR_DESC) is a short sentence or two describing the error. The context (LVEL_ERROR_CONTEXT) is a stack of calls that led to the error. If these lines do not appear in the error page, then the information is not displayed. 4. For creating the deployable EJB archive, set the WebSphere home directory in the AppBuilder system initialization file (AppBuilder\hps.ini) in the AP Java section. For example, WAS_HOME=c:\WebSphere\AppServer the drive and directory where WebSphere is installed. 5. Prepare the partitions according to the instructions in Chapter 3, Preparing the Application. Refer to Chapter 6, Packaging the Application to understand where AppBuilder puts the generated files. Briefly, the generated (archive) files are put in: AppBuilder\Java\RT\EachAppConfig\YourPartition Make sure the initialization files (appbuilder.ini and appbuildercom.ini) are in the AppBuilder\Java\RT directory of the client machine or in the directory where the client application resides (which is by default AppBuilder\Java\RT\YourAppConfig). If you have modified these initialization files before preparing the partitions, the information is included; if not, you must modify each instance of these files created for each EJB and servlet after preparation.
Caution
In the Partition Properties window, if the Server Interface is EJB, the package name is mandatory. Some application servers (like WebSphere 3.5) require a package name for preparing EJBs, and if the package name is not supplied, an error occurs at deployment time. Check the application server documentation to find out whether a package name is required. For information about the Partition Properties window, refer to Setting Partition Properties on page 2-10
6.
If you are developing and preparing EJBs (server rules) in a Java version 2 Enterprise Edition (J2EE) environment, make sure you have the following in your class path: j2ee_home\lib\j2ee.jar j2ee_home\lib\jhall.jar If you are using a database (such as Oracle or DB2), you need to install SQLJ to prepare database rules. For SQLJ rules, ensure that you have the following in your class path: db2java.zip runtime.zip
7-3
sqlj.zip You also need classes 111.zip if you prepare for an Oracle database. 7. For invoking EJBs from Java or thin-client, modify the initialization file (AppBuilder\Java\RT\appbuildercom.ini) with the name of the default server set to the WebSphere server. In the SERVER section, uncomment the SERVER.EJBWebSphere lines. The easiest way to do this is with the Communications Configurator. (Refer to the Configuring Communications Guide.) For example:
; Sample entries for WebSphere EJB Server [SERVER.EJBWebSphere] TYPE=EJB INITIAL_CONTEXT_FACTORY=com.ibm.ejs.ns.jndi.CNInitialContextFactory PROVIDER_URL=iiop://localhost:900 In the ROUTES section, set the route to WebSphere (or to the other server name if creating servlets only that are to run on remote servers). For example, [ROUTES] ; $ANY specifies the default server entry for remote rules $ANY=EJBWebSphere The value for $ANY must match the case of the name in the SERVER section of the file described above. For individual rules (as opposed to all the rules), specify the server by: RuleName1=EJBWebSphere RuleName2=EJBWebSphere
7-4
Database\Java\sqlj.zip
Note
This configuration must be performed only once. The values are shown on separate lines to make them easier to read; in the field, enter them all on one line.
If you are running the application server on a different machine from the one on which AppBuilder is installed, move the JAR files and the INI files mentioned so far in the AppBuilder\Java\RT directory to a directory named AppBuilder on the application server. If your application uses a Web service, the client- and the server-side use a Simple API for XML (SAX) parser for parsing the XML. One of the widely used SAX parsers can be downloaded from http://xml.apache.org/xerces2-j/index.html. After download and install of this parser package, include "xerces.jar" in the classpath. 2. If your application uses database access, create a JDBC data source in the WebSphere Administrative Domain in the Administrative Console. Use the same name as the database implementation name. Make sure the JDBC DSN and the ODBC DSN match. Also, make sure the drivers are the same. For example, if you specified db2Pool as the implementation name of the repository database associated with the EJB partition, then you must create a datasource named db2Pool in the Administrative Console. Make sure you use precisely the same capitalization in both places.
Note
This configuration needs to be performed only once. The values are shown on separate lines to make them easier to read; in the field, enter them all on one line.
If you are running the application server on a different machine from the one on which AppBuilder is installed, move the JAR files and the INI files mentioned so far in the AppBuilder\Java\RT directory to a directory named AppBuilder on the application server. 2. If your application uses database access, create a JDBC data source in the WebSphere Administrative Domain in the Administrative Console. Use the same name as the database implementation name. Make sure the JDBC DSN and the ODBC DSN match. Also, make sure the drivers are the same. For example, if you specified db2Pool as the implementation name of the repository database associated with the EJB partition, then you must create a datasource named db2Pool in the Administrative Console. Make sure you use precisely the same capitalization in both places.
7-5
If you use DB2, then you must use COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource implementation class name for the JDBC driver.
3.
4.
7-6
3.
Start the Administrative Console. From the Start menu, select Programs > IBM WebSphere > Application Server V4.0 > Administrators Console. Go to Nodes > Server name > Enterprise Applications and click Install. Specify the path to your .ear deployed file. Select Next and see a list of your EJBs, select Next again and see a list of your resources. Select Next again and un-check the re-deploy option and click Finish. Save your configuration. Stop the application server and restart it again. You are ready to call your EJBs from a client side.
3.
7-7
4.
6.
7-8
For Web services servlet, the webApplicationWebPath/appNameServlet is used in the HOST_URL for targeting to this Web service. When you configure the Client (as either Java or Thin-Client), create a new server entry and set the type of Server to WEBSERVICE and set the HOST_URL to: http://hostname:port/webApplicationWebPath/appNameServlet 8. For thin client configurations, put the start page file (by default RootRuleClassName.html) in the servlets directory. Copy the start page file (by default RootRuleClassName.html) to the HTTP server (IBM HTTP Server\htdocs) for the application server to find it.
5. 6.
Testing EJBs
If you are using EJBs with a Java client, copy the command files from the AppBuilder/NT/Sys/HLP/ CommandFiles directory to your local drive in the directory associated with you application configuration. If you are using EJBs with a Java client, modify the run-client command file (runWSClient.cmd) previously copied to the directory associated with your application configuration. Look in AppBuilder\Java\RT\YourAppConfig. Modify the call line with the drive letter and directory of your local installation as above. Modify the application configuration directory and the client JAR file name in the Java command, and type in the name of the top level rule of the client partition of your application at the end of the line. For example, java -classpath AppBuilder\Java\RT\helloworld\hello_html.jar; %WAS_CP%;%JARS_NEEDED%;%CLASSPATH%; Hello_World_Client_Rule Execute the run-client command file (runWSClient.cmd). Update the client-side initialization files as in step 7 of Configuring the Initialization Files.
Note
If you are using EJBs with a remote servlet, you need to include the deployed EJB jar file (EJB stubs) in the remote server classpath (the same place where you have appbuilder.jar).
7-10
Suggestion After you have fully tested your application, it is a good idea to drop that application from the hierarchy in the WebSphere Console and delete the home directory of the application from the disk. On WebSphere, even if you drop the application from the hierarchy and use a different name for the application and have an EJB that was being deployed, your new application that you are trying to test loads the classes for the old application. This can cause major conflicts not to mention you may have no idea what you are testing. Also, when you deploy an EJB, WebSphere puts that jar file in a directory called deployedEJBs. so you may want to delete that from the disk as well. On IBM AS/400 On the IBM AS/400 platform, to access a DB2 database with Java in WebSphere, you must put a different file in the classpath. What was originally db2java.zip is now apparently db2_classes.jar. Also, the JDBC driver we specify in the appbuilder.ini for UDB does not work as it does for other platforms. IBM has changed the call from: COM.ibm.db2.jdbc.app.DB2Driver to: com.ibm.db2.jdbc.app.DB2Driver The first three letters are lower case. It seems the files in the Java archive (JAR) are lower case now.
7-11
7-12
CHAPTER
With AppBuilder, you can develop, deploy, and test enterprise applications targeted for Java environments. This may include a servlet or an Enterprise Java Bean (EJB) or both running on an application server. This section describes the procedures to deploy and run Java applications on the BEA WebLogic application server, versions 5.1 and 6.0 or higher. This set of procedures assumes that you have WebLogic on your development machine along with AppBuilder. The procedures are: Configuring the Initialization Files (with WebLogic as the application server) Configuring the Application Server Deploying the EJB Partition (the EJB part of the application) Updating the Thin-Client Archive Deploying the Partition for Thin-Client and Web Services (the servlet part of the application) Testing the Deployed Application on WebLogic The configuring procedures apply to any implementation involving WebLogic. If you only need the EJB implementation, follow the procedures for updating and deploying the EJB. If you only need the servlet implementation, follow the procedures for updating and deploying the servlet. If you need both the servlet and EJB parts of the application, follow all the procedures. These instructions assume that you have WebLogic installed. For more information about developing applications for WebLogic, refer to the WebLogic documentation (http://www.weblogic.com/docs51/ resources.html). These instructions use the following conventions for directory names: WebLogic is the name for the drive and directory where WebLogic is installed (for example, c:\WebLogic). AppBuilder is the name for the drive and directory where AppBuilder is installed (for example, c:\AppBuilder). If you are using a database (not essential for WebLogic) the following instructions assume that you have installed IBM DB2/UDB or Oracle in the Database drive and directory (for example, c:\db2dir). Examples in this set of procedures use DB2/UDB 6.1 (or 7.1) database.
Note
Remember that application servers are case sensitive. Be sure to double-check any commands or URLs typed at a command prompt or in a command file or in entry fields in the interface.
8-1
Figure 8-1
Select the specific application server from the drop-down list. This is equivalent to setting the value in the hps.ini file.
Or you can modify the AppBuilder system initialization file (AppBuilder\hps.ini) so that the selected application server is WebLogic. In the AP Java section, uncomment or change the APPLICATION_SERVER value and comment out or remove the lines for the other servers. For example, APPLICATION_SERVER=WebLogic ; APPLICATION_SERVER=WebSphere For a thin client configuration, the generated partition includes an HTML start page and an error page, both generated from a default template. The default template can be overridden by setting the path to the new template files in the system initialization file, hps.ini, using these values: THINCLIENT_START_HTML=c:\defaultstart.html THINCLIENT_ERROR_HTML=c:\defaulterr.html where defaultstart.html and defaulterr.html are the names of template files. The default templates, svlt-startpage.htpl and svlt-errorpage.html, are in: AppBuilder\AD\CFG\DATA The start page template is assumed to have the following entry: <form method="get" action="$(SVLTCLS)"> where $(SVLTCLS) gets replaced by the generated action target. The error page template is copied as is during prepare. You may use any or all of the following lines in the error page to get more information displayed. <input type="text" name="LVEL_ERROR_CODE" size="20"> <input type="text" name="LVEL_ERROR_DESC" size="77"> <textarea rows="8" name="LVEL_ERROR_CONTEXT" cols="78"> </textarea>
8-2
The keywords are replaced by AppBuilder during execution if an error is encountered. The code (LVEL_ERROR_CODE) is a number representing the error. (Refer to the Messages Reference Guide.) The description (LVEL_ERROR_DESC) is a short sentence or two describing the error. The context (LVEL_ERROR_CONTEXT) is a stack of calls that led to the error. If these lines do not appear in the error page, then the information is not displayed. 2. Prepare the partitions according to the instructions in Chapter 3, Preparing the Application. Refer to Chapter 6, Packaging the Application to understand where AppBuilder puts the generated files. Briefly, the generated (archive) files are put in: AppBuilder\Java\RT\EachAppConfig\YourPartition Make sure the initialization files (appbuilder.ini and appbuildercom.ini) are in the AppBuilder\Java\RT directory of the client machine or in the directory where the client application resides (which is by default AppBuilder\Java\RT\YourAppConfig). If you have modified these initialization files before preparing the partitions, the information is included; if not, you must modify each instance of these files created for each EJB and servlet after preparation. 3. If you are developing and preparing EJBs (server rules) in a Java version 2 Enterprise Edition (J2EE) environment, make sure you have the following in your class path: j2ee_home\lib\j2ee.jar j2ee_home\lib\jhall.jar If you are using a database (such as Oracle or DB2), you need to install SQLJ to prepare database rules. For SQLJ rules, ensure that you have the following in your class path: db2java.zip runtime.zip sqlj.zip You also need classes 111.zip if you prepare for an Oracle database. If your application uses a Web service, the client- and the server-side use a Simple API for XML (SAX) parser for parsing the XML. One of the widely used SAX parsers can be downloaded from http://xml.apache.org/xerces2-j/index.html. After download and install of this parser package, include "xerces.jar" in the classpath. 4. For invoking EJBs from Java or thin-client, modify the initialization file (AppBuilder\Java\RT\appbuildercom.ini) with the name of the default server set to the WebLogic server. In the SERVER section, uncomment the SERVER.EJBServer lines. ; Sample entries for WebLogic EJB Server [SERVER.EJBWebLogic] TYPE=EJB INITIAL_CONTEXT_FACTORY=weblogic.jndi.WLInitialContextFactory PROVIDER_URL=t3://WebLogic_Server:7001
Note
If you have multiple servers and some rules will be put on different servers, two separate server entries need to be created for each appserver referenced. In this scenario, instead of using the $ANY setting in the [ROUTES] section, use RuleName=AppServer, where AppServer is the server entry.
For servlets only (no EJBs) that are to run locally, leave the default values for servers. For servlets only (no EJBs) that are to run on remote servers, either set the default server as RMI or NetEssential by uncommenting the appropriate lines or create a new server name. In the ROUTES section, set the route to WebLogic (or to the other server name if creating servlets only that are to run on remote servers). For example, [ROUTES] ; $ANY specifies the default server entry for remote rules $ANY=EJBWebLogic The value for $ANY must match the case of the name in the SERVER section of the file described above. For individual rules (as opposed to all the rules), specify the server by:
AppBuilder 2.1.0 Deploying Applications Guide 8-3
RuleName1=EJBWebLogic RuleName2=EJBWebLogic
2.
8-4
Appbuilder\Java\RT\hello_world\hello_ejb.jar This archive can be used within the WebLogic EJB deploy tool to prepare a deployable Java archive (JAR) that can be dynamically deployed on a WebLogic application server. The deploy tool can be invoked from the WebLogic program folder or can be run from the command line. 1. To run it from the command line on a Microsoft Windows (either NT or 2000) machine, from the WebLogic home directory, type: setenv.cmd and run this command: java -mx64m -ms64m weblogic.EJBDeployerTool where the first option (-mx64m) increases the heap size to 64 MB and the second option (-ms64m) increases the stack size to 64 MB. For UNIX, you would run this command: . setEnv.sh 2. Define the EJB C Properties for the Java compiler and create server entries with host name, port number, password, etc. Then open the created Java archive file (File > Open). For example, AppBuilder\Java\RT\hello_world\hello_ejb.jar and click generate container, which creates a deployable Java archive. This can be deployed using the Deploy command. 3. 4. Save the deployable Java archive. Click Save As and enter a name for the file. Add the compiled Java archive to the EJB section of the properties file (weblogic.properties). For example, weblogic.ejb.deploy=Target\hello_ejb.jar 5. 6. Add the deployed Java archive file to the classpath WEBLOGIC_CLASSPATH in the start command file (startWebLogic.cmd) for starting the WebLogic application server. If your application uses a database, you need to add a connection pool entry in the properties file (weblogic.properties). Associate the pool name with a physical database. For example, weblogic.jdbc.connectionPool.PoolName=\ url=jdbc:db2:DBName,\ driver=COM.ibm.db2.jdbc.app.DB2Driver,\ loginDelaySecs=1,\ initialCapacity=1,\ maxCapacity=4,\ capacityIncrement=1,\ allowShrinking=true,\ shrinkPeriodMins=15,\ refreshMinutes=10,\ testTable=TableName,\ props=user=UserID;password=Password;server=WLServer where: PoolName is pool name associated by the administrator with a physical database, DBName is a physical database name, like ABDEMO,
8-5
TableName is the database table name used by the database, UserID is the user of the database, Password is the user password of the database, WLServer is the name of the machine where the WebLogic Server resides. Associate the database JNDI name with the pool name already defined. The TXDataSource for the connection pool should be: weblogic.jdbc.TXDataSource.DBJNDIName=PoolName where: DBJNDIName is the database implementation name from the AppBuilder repository, PoolName is pool name associated by the administrator with a physical database, Access settings include weblogic.allow.reserve.weblogic.jdbc.connectionPool.PoolName= everyone 7. If you are using DB2/UDB (installed on Database) as a database, in startWebLogic.cmd, to the WEBLOGIC_CLASSPATH, add: Database\Java\db2java.zip, Database\Java\runtime.zip, Database\Java\sqlj.zip. 8. Start the WebLogic Server by issuing startWebLogic.cmd in the WebLogic directory. Once the WebLogic Server started message is displayed without any errors, the client is ready to run.
2.
8-6
3.
Include the required database archives into the CLASSPATH defined in startWebLogic.cmd. To use DB2/UDB, include Database\java\db2java.zip Database\java\runtime.zip Database\java\sqlj.zip
4.
Restart the Server for the modified domain. The server is ready to run.
3.
8-7
8-8
Testing EJBs
3. Copy the command files from the AppBuilder/NT/Sys/HLP/CommandFiles directory to your local drive in the directory associated with your application configuration. If you are deploying servlets with EJBs, get the run-client command file (runWLClient.cmd). The run-client command file runs the thick-Java client. If you are using EJBs with a thick-Java client, modify the run-client command file (runWLClient.cmd) previously copied to the directory associated with your application configuration. Look in AppBuilder\Java\RT\YourAppConfig. Modify the call line with the drive letter and directory of your local installation as above. Modify the application configuration directory and the client JAR file name in the Java command, and type in the name of the top level rule of the client partition of your application at the end of the line. For example, call e:\weblogic\setenv.cmd java -classpath AppBuilder\Java\RT\YourAppConfig\YourClientJar.jar; %CLASSPATH% YourTopLevelClientRule 5. Execute the run-client command file (runWLClient.cmd).
If you are using EJBs with a remote servlet, you need to include the deployed EJB jar file (EJB stubs) into the remote server classpath (the same place where you have appbuilder.jar).
4.
Note
8-9
required on the client. The easiest way to do this is to use the Communications Configurator (refer to the Configuring Communications Guide). For example: [SERVER.myServer] TYPE=WEBSERVICE HOST_URL=http://hostname:port/ServletContext/ServletName where hostname is the name of the server port is TCP/IP port number on which the servlet engine is listening. The default is 7001 or 7002. ServletContext refers to the context defined in the weblogic.properties under WebLogic version 5.1. In WebLogic version 6.0, this context refers to the Web archive (WAR) name. ServletName is name of the Web service partition in AppBuilder. and, for using the Web service from a third-party client, refer to Chapter 9, Executing the Application. The application is now deployed and ready to receive requests.
8-10
CHAPTER
After you develop and prepare an AppBuilder application in the Construction Workbench, the system creates the run-time files for the graphical user interface (GUI) for end-user access. The same run-time system is used whether the application runs transparently on a production workstation or from within the Construction Workbench on a development workstation. Some generated applications operate as client/server systems on both workstations and servers. Other applications operate as distributed processing systems on both workstations (or dumb terminals) and mainframes. There is built-in AppBuilder support for both scenarios. Configuring communications includes setting the route table and other settings in the dna.ini file (for internal AppBuilder communications). After an application is prepared, the required portions of the underlying structure are compacted into efficient executable form, and the application can be run from a pull-down menu or a start programs item. On a development workstation, an application is run either by selecting a start item or entering a command-line program name. Once the menu bar (or start item) is displayed, selecting individual menu choices (or submenu items) begins execution of the associated process or rule. The execution of a distributed application includes running the application objects on several machines. The application can be run from the Construction Workbench or the command line. This section explains the procedures for executing the distributed application. The basic steps are: Extracting the Web Archive Customizing the Initialization Files (the INI files) Configuring for Thin Client Execution (and adding a start page for Web applications) Recreating the Archive Executing an Application Invoking an AppBuilder Web Service (if you are using Web services) Understanding Execution Differences (if you want to understand how thin clients differ from thick clients at execution time) Using Date Completion Shortcuts (if you want to use some shortcuts)
9-1
CACHE_TYPE
ERROR_PAGE
MAX_CACHED_SESSIONS MAX_CONCURRENT_SESSIO N
MEMORY_CACHE_TIMEOUT
CHARACTER_ENCODINGS
9-2
SAX_PARSER
PARSER_BUF_SIZE
LOGGING
9-3
9-4
9-5
Executing an Application
There are several ways to execute an application: Executing from the Construction Workbench Executing from the Start Menu Executing from the Command Line Whether you have prepared the application with the menu and menu choices or with the shortcut and Start menu option, the application execution is the same. When you run the application, the choices in the menu bar (or entries in the Start menu) corresponds to the functions in your application hierarchy and the choices in each pull-down menu (or entries in the submenu of the Start menu) correspond to the processes within that function. For example, the Java execution client is displayed as shown in Figure 9-1. From that window, select the menu to see the functions that were prepared for that application.
Figure 9-1 Java Execution Client window
9-6
Executing an Application
Executing an Application
{ //override JApplets init method to set the desktop pane and //kick-off the Root Rule public void init() { try { /*Create a new JDesktopPane and set it as the content of the Applets viewing area. This also should be set in AppBuilder to be used as a container for the application windows. The DesktopPane is required when using the InternalFrames for the app windows. Refer to the Configuring the AppBuilder for information on the different types of Applet window. */ JDesktopPane p=new JDesktopPane(); //set DesktopPane to be the content pane setContentPane(p); //set it as a parent of all AppBuilder windows AbfSystem.setDesktopPane(p); /*Prompts for root rule name and invokes it. Make sure the Root Rule and other application classes are included in the archive param when defining the applet in the starting HTML. */ String ruleName=JOptionPane.showInputDialog("Enter Root Rule Name:"); //convert the Rule name to Java class name Sting ruleClassName=AbfModule.genClassName(ruleName); //Kick-off the rule AbfModuleStartup rs=new AbfModuleStartup(null, null, ruleClassName, false, null); rs.startup(); getContentPane().setBackground(SystemColor.window); } catch(NoSuchElementException ex) { showErrorMessage("NoSuchMethodException"); } } public void start() { } public void stop() { } private void showErrorMessage(String errorMessage) {
9-8
Executing an Application
String showPopup=System.getProperty("appbuilder.showMessage"); if (showPopup==null||!showPopup.equals("NO")) { JOptionPane.showMessageDialog(null, errorMessage, null JOptionPane.ERROR_MESSAGE); { } //a method called from Javascript... public Sting showMsg(Sting msg) { return"Hello from Java"; //JOptionPane.showMessageDialog(null, mesg); } }
Executing an Application
width="700" height="500" align="baseline" code="FrameApplet.class" archive="appbuilder.jar" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugininstall.html"> <NOEMBED> </COMMENT> alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! </NOEMBED> </EMBED> </OBJECT> <script LANGUAGE="JAVASCRIPT"> function CallJava() { // display a message returned from Java applet alert( document.forms[0].TestApp.showMsg() ) //FrameApplet.showMsg( "message from Java script" ) } </script> <!--"-----------------------------------------------------"--> <!--"Dislay a header for the page "--> <!--"-----------------------------------------------------"--> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" WIDTH="100%"> <TR> <TD><IMG ALT="Bluephoenix Solutions" SRC="BPLogo.jpg"></TD> </TR> </TABLE> <BR> <B><FONT TYPE="ARIAL" SIZE=5>AppBuilder - Frame Internal Applet</ FONT></B> <BR> <!--"-----------------------------------------------------"--> <!--"Dislay the applet in the page "--> <!--"-----------------------------------------------------"--> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" WIDTH="750"> <TR> <TD WIDTH="25"></TD> <TD ALIGN="center" VALIGN="top" WIDTH="700"> <!--"-------------------------------------------------------"-> <!--"Start of code used to control the display of the Applet"--> <!--"OBJECT section is for InternetExplorer "--> <!--"EMBED section is for Netscape Navigator "--> <!--"-------------------------------------------------------"-> <!--"-----------------------------------------------------"-->
9-10
Executing an Application
<!--"End of code used to control the display of the Applet"--> <!--"-----------------------------------------------------"--> </TD> <TD WIDTH="25"></TD> </TR> </TABLE> <!--"-----------------------------------------------------"--> <!--"Dislay a footer for the page "--> <!--"-----------------------------------------------------"--> <BR> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH="750"> <TR> <TD WIDTH="600"></TD> <TD WIDTH="150"> <P ALIGN="right"><FONT FACE="Arial" SIZE=1 COLOR="#000000"> last updated on 07-Oct-2001 </FONT></P> </TD> </TR> </TABLE> <HR ALIGN="left" WIDTH="750"> </BODY> </HTML>
Configuring AppBuilder
AppBuilder provides two different types of Applet windows beginning in Version 2.1. The generated AppBuilder windows can be displayed as a separate popup windows and it will be displayed outside the Browsers display area. This will be the default behavior. In Version 2.1, it can also be configured to be displayed as Internal windows which runs entirely within the Browsers display area. To use the browser's display area as a container, AppBuilder API should be used to set the container. Refer to "Creating Java Applet class" for how this API can be used. In addition to using the API, the setting FRAME_TYPE should be set to INTERNAL in the [NC] section of appbuilder.ini. By default, this will be set to WINDOW. When using Java internal frames, the parent/containers desktop pane can be set using the following API, AbfSystem.setDesktopPane( pane ); And this should be invoked before trying to load the AppBuilder Rule class. And the desktopPane should also be added to the applet's content pane. Refer to "Creating a Java applet class" for details. AbfSystem.getDesktopPane() method can be used to get the container back. [NC] ; WINDOW - for using Java Frames as in previous versions. ; INTERNAL_FRAME - for using Internal Frames ; The default will be WINDOW. FRAME_TYPE=WINDOW
9-11
Configuring Web/AppServer
Please refer to the Web/AppServers documentation on deploying the HTML to start the Applet. Create an alias for the application to be deployed and map the alias to a physical directory. Deploy the AppBuilder.jar, the configuration files (appbuilder.ini, appbuildercom.ini, font.ini) and the generated application java archives (PARTITION_NAME.jar) with the HTML.
Note
4.
This classpath is required only for the server and the registry should not include it.
Edit appbuilder.ini to define the RMI_SERVER_HOST and RMI_SERVER_PORT under DEBUG section. The HOST refers to the name of the server running the RMI Registry service and the PORT number on which the service is listening. Start the RMI server: java appbuilder.server.AbfRmiServer
5.
9-12
The server will register it's name with the naming registry. 6. 7. The server is now ready to process client requests. Edit the client side appbuildercom.ini or use the Management console to create a new server entry for the RMI Server. Set the REGISTRY_URL to rmi://host:1099, where host is the name of the workstation running the server in Step 4 and 1099 is the port number the naming registry is listening to. Define a new Route entry using the RMI server entry. Run the Java client or Thin-client to invoke the RMI server.
8. 9.
Refer to http://java.sun.com/docs/books/tutorial/rmi/running.html for further RMI setup issues. Refer to Debugging Applications for using the RMI Server for debugging purposes.
9-13
Table 9-3
AppBuilder to XML mapping of data types (Continued) XML data type Decimal with total digits and fraction digits set to Field Length and Field Fractions respectively String (unicode) Not Supported Int String (unicode) Not Supported decimal with total digits and fraction digits Short Not Supported Time. The values will be in '%0t:%0m:%0s' format. DateTime. In addition to Date and Time, it has the remaining time value as fraction. The space is the separator between these three values. So the whole format is: %Y/%0m/%0d %0t:%0m:%0s xxx where xxx is a numeric value. String with maxLength set to the AppBuilder Field Length Represented as a complexType using the name of the view as the type name Represented as a complexType with a suffix occurs attached to the view name. And the view itself will be the only data member of this type.
AppBuilder data type Decimal DBCS Image Integer Mixed Object Ref Picture Small Integer Text Time
Timestamp
Sample Schemas
See Sample 1 and Sample 2.
Sample 1
For this example, the following are shown: CUSTOMER_INFO view as defined in AppBuilder Generated XML Schema Instance of CUSTOMER_INFO view in XML CUSTOMER_INFO view as defined in AppBuilder CUSTOMER_INFO : view CUSTOMER_ID: integer field COMPANY_NAME: character 30 ADDRESS : view STREET: character 30 CITY: character 20 ZIP : character 10 Generated XML Schema <xsd:schema xmlns:xsd=http://schemas.xmlsoap.org/soap/encoding>
9-14
<xsd:complexType name=ADDRESS_TYPE> <xsd:sequence> <xsd:element name=STREET> <xsd:simpleType base=xsd:string> <maxLength value=30/> </xsd:simpleType> </xsd:element> <xsd:element name=CITY> <xsd:simpleType base=xsd:string> <maxLength value=20/> </xsd:simpleType> </xsd:element> <xsd:element name=ZIP> <xsd:simpleType base=xsd:string> <maxLength value=10/> </xsd:simpleType> </xsd:element> </xsd:sequence> <xsd:complexType> <xsd:complexType name=CUSTOMER_INFO> <xsd:sequence> <xsd:element name=CUSTOMER_ID type=xsd:int/> <xsd:element name=COMPANY_NAME> <xsd:simpleType base=xsd:string> <maxLength value=30/> </xsd:simpleType> </xsd:element> <xsd:element name=ADDRESS type=ADDRESS_TYPE/> </xsd:sequence> </xsd:complexType> Instance of CUSTOMER_INFO view in XML <CUSTOMER_INFO> <CUSTOMER_ID>1234</CUSTOMER_ID> <COMPANY_NAME>ABC Company</COMPANY_NAME> <ADDRESS> <STREET>xyz street</STREET> <CITY>a city name</CITY> <ZIP>12345-1234</ZIP> </ADDRESS> </CUSOMTER_INFO>
Sample 2
For this example, the following are shown: CUSTOMER_ORDERS view with a nested occurs view. Generated XML schema Instance of CUSTOMER_ORDER view in XML
9-15
CUSTOMER_ORDERS view with a nested occurs view. CUSTOMER_ORDER : view ORDER_ID : integer field CUSTOMER_ID: integer ORDER_DATE: date ORDERS : view OCCURS 10 PRODUCT_ID : integer UNIT_PRICE : decimal(15,2) QUANTITY : small Integer Generated XML schema <xsd:schema xmlns:xsd=http://schemas.xmlsoap.org/soap/encoding> <xsd:complexType name=ORDERS_TYPE> <xsd:sequence> <xsd:element name=PRODUCT_ID type=xsd:int/> <xsd:element name=UNIT_PRICE> <xsd:simpleType base=xsd:decimal> <totalDigits value=15/> <fractionDigits value=2/> </xsd:simpleType> </xsd:element> <xsd:element name=QUANTITY type=xsd:short/> </xsd:sequence> </xsd:complexType> <xsd:complexType name=CUSTOMER_ORDER> <xsd:sequence> <xsd:element name=ORDER_ID type=xsd:int/> <xsd:element name=CUSTOMER_ID type=xsd:int/> <xsd:element name=ORDER_DATE type=xsd:date/> <xsd:complexType name=ORDERS_OCCURS> <xsd:element name=ORDERS type=ORDERS_TYPE maxOccurs=10/> </xsd:complexType> </xsd:sequence> </xsd:complexType> Instance of CUSTOMER_ORDER view in XML <CUSTOMER_ORDER> <ORDER_ID>12345</ORDER_ID> <CUSTOMER_ID>54321</CUSTOMER_ID> <ORDER_DATE<2001-08-15</ORDER_DATE> <ORDERS_OCCURS> <ORDERS> <PRODUCT_ID>1111</PRODUCT_ID> <UNIT_PRICE>1234.56</UNIT_PRICE> <QUANTITY>10</QUANTITY> </ORDERS> <ORDERS> <PRODUCT_ID>2222</PRODUCT_ID> <UNIT_PRICE>1234.56</UNIT_PRICE> <QUANTITY>20</QUANTITY>
9-16
</ORDERS> <ORDERS> <PRODUCT_ID>3333</PRODUCT_ID> <UNIT_PRICE>1234.56</UNIT_PRICE> <QUANTITY>30</QUANTITY> </ORDERS> <ORDERS> <PRODUCT_ID>4444</PRODUCT_ID> <UNIT_PRICE>1234.56</UNIT_PRICE> <QUANTITY>40</QUANTITY> </ORDERS> <ORDERS> <PRODUCT_ID>5555</PRODUCT_ID> <UNIT_PRICE>1234.56</UNIT_PRICE> <QUANTITY>50</QUANTITY> </ORDERS> </ORDERS_OCCURS> </CUSTOMER_ORDER>
AppBuilder Client
AppBuilder makes it very easy to invoke a Web service from its client application and it is similar to invoking other Server interfaces such as NetEssential, EJB, or MQ. Configure the client to invoke a server rule published as a Web service by defining the ROUTES and the SERVER entries in appbuildercom.ini. Create a server section with the following entries: [SERVER.ws_server] TYPE=WEBSERVICE URL=http://hostname:port/context/servlet where hostname refers to the server hosting the Web service, port is the TCP port on which the servlet engine (like WebLogic, WebSphere or TOMCAT) runs context is the servlet application name or the context servlet the Web service partition name And define a routes entry to this server: [ROUTES] $ANY=ws_server
Tip
Refer to Setting Web Service Execution Parameters for additional configuration information.
With these, any AppBuilder client (thick Java or thin HTML) application using this configuration sends a SOAP/XML request to the server and receives the response in SOAP/XML as well. The AppBuilder VIEW to XML conversion and vice versa is handled by AppBuilder.
9-17
Third-Party Client
The AppBuilder Web service server uses standard SOAP/XML and any third-party client application can be used to send a request per the SOAP/XML specifications. As well, the response sent from the server complies with the standard. The client application can be in any one of the programming languages such as Java, Microsofts VisualBasic, etc. The AppBuilder package has a sample client application in Microsoft VisualBasic (VB) under the samples directory. The file SoapTest.zip contains the VB source files and an executable SoapTest.exe. Refer to: Running the Sample Application Building the Sample VB Application
4. 5.
9-18
2.
9-19
9-20
No ImmediateReturn Property
The ImmediateReturn property is supported on both Java and HTML clients for CheckBox and RadioButton objects. For other objects, it is supported for Java clients only. Refer to the ObjectSpeak Reference Guide for a complete list of objects and properties supported.
9-21
No Format Properties
The setting and getting of color, font, and size attributes involve parsing the style sheet information associated with each HTML Input element. For performance reasons, these methods are not supported. SetForeground and GetForeground SetBackground and GetBackground SetFontand GetFont SetSize and GetSize
9-22
9-23
Date completion examples Date Result 5th May, 2001 (if current day is 24th May, 2001. It keeps the rest of the date.) 5th February, 2001 3rd April, 1999 21st October, 2000 12th January, 2001 9th September, 1943
9-24
CHAPTER
10
With AppBuilder, you can develop, deploy, and test enterprise applications targeted for Java environments on an Apache Web server. This section describes the procedures to deploy and run Java applications on this server and servlets if you also have Tomcat. AppBuilder supports Apache Web server with Tomcat servlet container. Tomcat is a plug-in to run servlets in Apache, Microsoft IIS, and Netscape Web servers. This set of procedures assumes that you have Apache on your development machine along with AppBuilder. This set of procedures describes only the Apache server; for using Tomcat with the other servers, refer to the Apache Web site. The procedures include: Configuring the Initialization Files (for Apache as the Web server) Updating the Thin-Client Archive Configuring Tomcat Testing the Deployed Java on the Web server These instructions assume you have Tomcat installed. For more information about Tomcat, refer to the Jakarta Web site for Tomcat documentation (http://jakarta.apache.org or http://apache.org). These instructions use the following conventions for directory names: Tomcat is the name for the drive and directory where Apache and Tomcat are installed (for example, c:\Apache). AppBuilder is the name for the drive and directory where AppBuilder is installed (for example, c:\AppBuilder). If you are using a database (not essential for Apache), the following instructions assume that you have installed IBM DB2/UDB in the Database directory (for example, c:\SQLlib).
Note
Remember that application servers are case sensitive. Be sure to double-check any commands or URLs typed at a command prompt or in a command file or in entry fields in the interface.
10-1
5.
Select the application server in the Construction Workbench in the Workbench Options, Preparation tab, as shown in Figure 10-1.
Selecting application server in Preparation options
Figure 10-1
Select the specific application server from the drop-down list. This is equivalent to setting the value in the hps.ini file.
Tomcat
Or you can modify the AppBuilder system initialization file (AppBuilder\hps.ini) so that the selected application server is Tomcat. In the AP Java section, uncomment or change the APPLICATION_SERVER value and comment out or remove the lines for the other servers. For example, if you change the value with the Management Console, it is: APPLICATION_SERVER=Tomcat The generated partition includes an HTML start page and an error page, both generated from a default template. The default template can be overridden by setting the path to the new template files in the system initialization file, hps.ini, using these values: THINCLIENT_START_HTML=c:\defaultstart.html THINCLIENT_ERROR_HTML=c:\defaulterr.html where defaultstart.html and defaulterr.html are the names of template files. The default templates, svlt-startpage.htpl and svlt-errorpage.html, are in: AppBuilder\AD\CFG\DATA The start page template is assumed to have the following entry: <form method="get" action="$(SVLTCLS)"> where $(SVLTCLS) gets replaced by the generated action target. The error page template is copied as is during prepare. You may use any or all of the following lines in the error page to get more information displayed. <input type="text" name="LVEL_ERROR_CODE" size="20"> <input type="text" name="LVEL_ERROR_DESC" size="77"> <textarea rows="8" name="LVEL_ERROR_CONTEXT" cols="78"> </textarea> The keywords are replaced by AppBuilder during execution if an error is encountered. The code (LVEL_ERROR_CODE) is a number representing the error. (Refer to the Messages Reference Guide.) The description (LVEL_ERROR_DESC) is a short sentence or two describing the error. The context (LVEL_ERROR_CONTEXT) is a stack of calls that led to the error. If these lines do not appear in the error page, then the information is not displayed. 6. Prepare the partitions according to the instructions in Chapter 3, Preparing the Application. Refer to Chapter 6, Packaging the Application to understand where AppBuilder puts the generated files. Briefly, the generated (archive) files are put in: AppBuilder\Java\RT\EachAppConfig\YourPartition
10-2
Make sure the initialization files (appbuilder.ini and appbuildercom.ini) are in the AppBuilder\Java\RT directory of the client machine or in the directory where the client application resides (which is by default AppBuilder\Java\RT\YourAppConfig). 7. Modify the AppBuilder\Java\RT\appbuildercom.ini file so that the default server is RMI or AppBuilder communications (NetEssential).
3.
Configuring Tomcat
1. Create a configuration file, configfile.conf using the generated configuration file (tomcat-apache.conf) as the base in the Tomcat/conf subdirectory. (This file is created only after Tomcat has been started). Add the following entries for the Web application, Alias /context Tomcat/webapps/context_home <Directory "Tomcat/webapps/context_home"> Options Indexes FollowSymLinks
</Directory> ApJServMount/context/RootRule_Svlt/context <Location /context/WEB-INF/> AllowOverride None deny from all </Location> where context refers to the URL alias used from the Web Browser, context_home refers to a subdirectory under the Tomcat/webapps directory, and RootRule_Svlt refers to the name of the generated servlet. Use forward slash (/) for a path separator. If the context and context_home are different, add this server.xml entry: <Context path="/context" docBase="webapps/context_home" debug="0" reloadable="true"> If the server.xml entry is dropped, Tomcat automatically loads the servlet from the webapps/ context_home directory with a context of /context_home. 2. This configuration file should include the other entries defined in the generated configuration file (tomcat-apache.conf), such as JServModule, etc., which defines the adapter to the Apache server. Refer to the Tomcat documentation for configuring these entries. Include this configuration file with the Apache configuration file, httpd.conf, using: include Tomcat/conf/configfile.conf 4. Create a subdirectory using the name defined in the configuration file, context_home under the Tomcat/webapps directory. Extract the generated Web archive, partition_name.war, to this subdirectory. Restart Tomcat using the startup script in Tomcat/bin directory.
3.
5.
10-4
10-5
10-6
CHAPTER
11
TROUBLESHOOTING PROBLEMS
Several types of problems might prevent the successful preparation or execution of the distributed application. Be sure to verify and debug your application at each stage of development. Review error messages and logs for more information about the particular problem you are having. This section explains the procedures for determining the type of problem with a distributed application and basic troubleshooting of those problems. The problems may be categorized by the stage in the application development process. The job of resolving problems includes the following tasks. Resolving Partitioning Problems Resolving Packaging Problems Resolving Communication Errors Resolving Execution Problems Partitioning problems involve some mistake in the configuration of the application. Packaging problems involve preparation, packaging, or deploying the code for that application. Communications problems involve the communication between modules on different platforms. Execution problems involve limitations specific to the target environment.
11-1
The Details window displays the message. Scroll down to the bottom of that window to see a summary.
Figure 11-2 Resulting Details window with message
The message says that the Java compiler is not in the classpath.
11-2
Troubleshooting Problems
11-3
11-4
Troubleshooting Problems
11-5
11-6
Troubleshooting Problems
APPENDIX
SUPPORTED CONFIGURATIONS
Supported configurations include the following. This is not an exhaustive list of possible configurations. The intention is to give you an idea of the flexibility of deploying with AppBuilder. Thin-Client (HTML Client with Servlet) Java Client on a Departmental Server Windows Client/Server Traditional
A-1
Figure A-2
A-2
Supported Configurations
Windows Client/Server
Figure A-4
Windows Client/Server
Figure A-5 Sample client/server configuration
A-3
Traditional
Traditional
The traditional configuration includes a client with the server rules running on a host.
Figure A-6 Sample distributed configuration
A-4
Supported Configurations
APPENDIX
The standard AppBuilder installation includes a sample application (HELLO_WORLD) and a set of sample configurations that demonstrate the various application configurations and deployment possibilities. You can use this set of sample applications, different configurations of a HelloWorld application, to test the deployment of various configurations on different platforms. Step through the deployment of a sample distributed application by doing the following: migrating the sample application to a repository so that it is available to AppBuilder building the distributed configurations from the Construction Workbench deploying the application configurations to machines running the sample application to check the results When AppBuilder is installed, a SAMPLES directory is created. In that directory is a compressed file with all the repository files that are needed. The procedures that follow explain how to migrate these files to a personal or group repository from which you can then prepare and deploy the versions of the application. The versions of the application are: a client-only application called C_HelloWorldHTML a client/server application called CS_HelloWorldHTML The C_HelloWorldHTML application is a client-only application that executes an AppBuilder rule and displays a Hello World string as HTML. The CS_HelloWorldHTML application is a client/server application that invokes a server rule to concatenate a string to the Hello World string and display it as HTML. The client rule can use any of the supported AppBuilder server interfaces (NetEssential, EJB, or RMI).
B-1
8.
3.
In the Insert Application Configuration window, select the HELLO_HTML application configuration (from the repository) and click Insert.
B-2
4.
This configuration now appears under the Project entity. It can be expanded, but has only one partition, HELLO_HTML. Select the partition, right-click, and select Properties to view the properties for the partition. Set the properties: Partition type to Client Client type to HTML Server interface to N/A Language to Java Package (by default, the name of the partition) to HELLO_HTML Click OK. If you get a message about a failure because you do not have permission to update this file, check with the System Administrator about permissions to those files in that location.
5.
In the Configuration hierarchy, expand this partition and see that it has a Process and a Machine. Select Properties for the Machine entity and set the Implementation name to Local for preparing the partition to the local machine. Commit the changes to the repository by selecting File > Commit. Prepare the partition and all its parts by selecting the partition in the Configuration hierarchy, right-clicking, and selecting Super Prepare.
6. 7.
3. 4.
In the Insert Application Configuration window, select the HELLO_HTML application configuration (from the repository) and click Insert. This configuration now appears under the Project entity. It can be expanded, but has only one partition, HELLO_HTML. Select the partition and right-click and select Properties to view the properties for the partition. Set the properties: Partition type to Client Client type to HTML Server type to N/A Language to Java Server interface to NetEssential, EJB, or RMI, depending on where the server rule is to run. Select NetEssential as the interface for this sample if you are not sure which to select.
B-3
Package (by default, the name of the partition) to HELLO_HTML Click OK. 5. In the Configuration hierarchy, expand this partition and see that it has a Process and a Machine. Select Properties for the Machine entity and set Implementation name to Local for preparing the partition to the local machine. Commit the changes to the repository by selecting File > Commit. Prepare the partition and all its parts by selecting the partition in the Configuration hierarchy and right-click select Super Prepare.
6. 7.
2.
2. 3.
5. 6.
B-4
7. 8. 9.
Start the preparation result server on the development machine. From the desktop of that machine, Start > Programs > AppBuilder > Communications > TCP agent on ne20. Super prepare this partition. The server rule is prepared to the targeted machine using the default language. Start the remote execution server on the AppBuilder communications server machine. From that machine, Start > Programs > AppBuilder > Communications > TCP agent on ne20.
B-5
B-6
APPENDIX
For Windows applications, rules without input views can be run from the command line. This is available at execution time for C clients only. Use the master.exe command: master.exe -r yourrule sysid [-u database] where yourrule is the name of the rule, sysid is the system identifier, and database is the name of the database. The -u option (and the database name) is only needed when you are executing an application with a database. The following are valid parameters in the run-time executable master.exe.
Table C-1 Valid master.exe parameters
Parameter
Description Specify code page support Specify execution environment (for mainframe) host name Specify default help file name Specify an icon for the upper left corner of a window Specify procedure name an AppBuilder process name Specify root rule to execute an AppBuilder rule name Specify the system initialization file (hps.ini) location Specify the database name database manager file name
-c -e -h -i -p -r -s -u
If you have created a function (executing from the menu), and you add or change your application from a non-database application to a database application (for local execution), you must re-prepare the function. Re-preparing the function adds the -u option to the menufile.mnu. Without the -u option, the application runs, but tries to interact with a database, which results in an error -1024 (connection does not exist to database).
C-1
C-2
Index
INDEX
AppBuilder 2.1.0 Deploying Applications Guide
A
advice file 6-10 alias or context (for Web application 9-3 Apache application server (using Tomcat) 6-6 Apache Web server 10-1 appbuilder.ini file 6-6, 6-8, 6-9, 9-2, 9-3, 11-3, 11-4 appbuilder.jar file 6-6 appbuildercom.ini file 6-6, 6-9, 9-2 Applet 9-7 application sample B-1 Application Configuration rebuild 4-1 application configuration 2-6 application execution 9-6 application server WebLogic 8-1 WebSphere 7-1 associating clients and servers with machines 2-11
B
background, preparation running in 3-10 BEA WebLogic application server 6-6, 8-1 bind files using existing 3-12 blank system IDs (not supported) 9-22 buffer size, parser 9-3 build See preparing an application. building See preparing.
client/server configuration 6-7, 9-1, A-3, B-1, B-3, B-4, B-5 code page option for command line C-1 command line rules execution C-1 committing changes 2-6 common mistakes 3-3 compiler listing 5-5 configuration application 2-6 definition 1-3, 2-1 example with multiple partitions 2-5 partitions of 2-8 WebLogic 8-4 WebSphere 7-4 configuration file for Tomcat 10-4 Configuration tab 1-4, 2-1, 2-5, 2-6, 2-11, 2-14, 2-15, 3-1, 3-4, 3-7, 3-8, 3-9 Construction Workbench 1-4, 3-1 context (for Web application) 9-3 Conversation server 6-9 cookies, HTTP (for authentication) 9-5 Create Table in prepare 3-5 creating application start page 9-3 menu (for function) 3-12 shortcut (for function) 3-12 Web client session 9-3 Ctrl+Alt+P, select Project Options 2-2
D
data change with focus change 9-20 data types, AppBuilder to XML 9-13 database EJB access 2-16 database connection pool 6-6 database files location 7-4, 7-5 database option for command line C-1 database options 3-12 date and time 9-23 date completion 9-23
C
C execution client 9-6 -c, code page option for command line C-1 cache 9-4 Changed List Table 4-4 character encoding 9-5 classpath 11-2 client authentication 9-6 client partitions 2-8
date field 9-23 DB2 packages 5-2 DB2 plans 5-2 DBCS support 3-12 debugging rule 3-12 default settings (for preparing standalone application) 3-12 Delete Table in prepare 3-5 dependent classpath 7-4 deploying client/server B-4 EJB partition 7-6, 8-4 sample application B-4 thin-client (HTML) B-4 deploying the servlet partition 7-8, 7-9 deployment descriptor 6-5, 6-6 Details 11-2 development environment 1-3 differences between runtime clients 9-19 directory structure (of generated files) 6-1 disable title bar 9-22 distributed application definition 1-3 one partition selected (figure) 3-8 dna.ini file 9-1 double-byte character set (DBCS) support 3-12 duplicate system ID 9-22 duplicate system IDs (not supported) 9-22
F
file appbuilder.ini 6-6, 6-8, 6-9, 9-2, 9-3, 11-3, 11-4 appbuilder.jar 6-6 appbuildercom.ini 6-9, 9-2 dna.ini (communications) 9-1 ErrorPage.html 6-6 generated 6-1 hps.ini 3-11, 3-12, 7-2 INI 7-2, 7-3, 7-4, 8-2, 10-2 JAR (Java archive) 6-5, 6-7, B-4 WAR (Web archive) 6-6, 9-2, 9-6 Web archive (WAR) 6-5 form 9-21, 9-22 forward slash (/) as path separator 10-4 function execution from Start menu 9-6 preparation as menu item 9-6 settings 3-12
G
gateway 2-10 gateway partitions 2-8 generated files 6-1 generated output language 3-6 global character support 3-12
E
-e, execution environment option for command line C-1 EJB accessing a database 2-16 definition 3-3 partition 7-6, 8-4 preparing 3-3 testing 7-9, 8-9 embedded SQL 3-5 embedded SQL (in prepare) 3-5 Enterprise Java Bean (EJB) 3-3, 7-1, 7-6, 7-9, 8-4, 8-9, 9-6 error code (LVEL_ERROR_CODE) 11-4 context (LVEL_ERROR_CONTEXT) 11-4 custom error Web page 11-4 description (LVEL_ERROR_DESC) 11-4 message in Status window 11-2 page in HTML 11-4 ErrorPage.html 6-6 executing function from Start menu 9-6 executing the application 9-6 execution differences 9-19 execution environment 1-3, 3-2 execution environment option for command line C-1
H
-h, default help file option for command line C-1 hashing 6-9 HelloWorld application B-1 help file default option for command line C-1 hierarchy objects toolbar 2-6 Hierarchy window Configuration tab 1-4, 2-1, 2-5, 2-6, 2-11, 2-14, 2-15, 3-1, 3-4, 3-7, 3-8, 3-9 Project tab 1-4, 3-1, 3-8 Repository tab 1-4, 3-1, 3-8 hps.ini file 3-11, 3-12, 7-2 setting location from command line C-1 HTML form 9-21, 9-22 HTML Input element 9-22 HTML start page 9-3, 9-4
I
-i, icon option for command line C-1 IBM DB2/UDB 7-1, 8-1, 10-1
Index
IBM WebSphere application server 6-6, 7-1 icon option for command line C-1 IgnoreValidation property 9-21 ImmediateReturn property 9-21 Impact Analysis 4-4 Impact List Table 4-4 implementation name 7-5 initialization file (INI file) 7-2, 7-3, 7-4, 8-2, 10-2 install wizard 6-7 interpreting results 3-10 IP address for remote prepare 5-3
menu items, preparation of function as 9-6 migrating sample application B-2 MLS support character encoding 9-5 multi-column list box (MCLB) 9-22
N
Netscape application server (using Tomcat) 6-6
O
objects verifying 3-10 objects, preparable 3-4 ObjectSpeak events 9-20 ObjectSpeak properties 9-21 option validating sets 3-10 options preparation 3-11 remote preparation 3-11 See Workbench Options. Oracle database 8-1 preparation for 3-3, 7-4, 8-3 output language, determining 3-6 Output window 3-10 purpose 3-10
J
J2EE as prerequisite 3-3 compliant servlet 6-6 environment 7-3, 8-3 specification for packaging 6-2 J2EE-compliant servlet 6-6 Japanese character support 3-12 Java Applet 1-1 Frames 9-7 Internal Frames 9-7 Java archive (JAR) file 6-5, 6-7, 7-4, 7-5, B-4 Java clients 6-7 Java Development Kit (JDK) 9-22 Java execution client 9-6 Java version 2 Enterprise Edition (J2EE) 3-3 Java virtual machine (JVM) 1-4 JDBC (Java Database Connectivity) 3-5 JNDI (Java Naming and Directory Interface) 9-6
P
-p, procedure name option for command line C-1 package name B-4 default to partition name B-4 Java archive file B-4 required 2-10, 7-3 parameters, runtime 9-7 parser buffer size 9-3 parser, Simple API for XML 7-5, 8-3, 9-3 Partition rebuild 4-1 partition client 2-8 definition 2-8 gateway 2-8 properties 2-10 selecting (for preparation) 3-8 server 2-8 setting properties 2-10 path separator 10-4 Prep Status tab 11-2 PREP_DB_OPTIONS option 3-12 preparable objects 3-4 Preparation and Test Server 6-7
L
language of generated output 3-6 launching the application 9-6 link listing 5-5 list recent projects 2-17 local machine name 5-3 loopback adapter use IP address for remote prep 5-3
M
machine setting properties 2-11 machine group name 2-13, 5-3 mainframe libraries 5-5 Mandatory property 9-21 mapping of data types 9-13 master.exe parameters 9-7, C-1 menu file name 3-12
Index
preparation options 3-11, 3-12 Preparation Query window 3-9 preparation See preparing. prepare Create Table action 3-5 Delete Table action 3-5 order of 3-5 when changing from non-database to database application C-1 Prepare, using 3-4 preparing all children of an object 3-8 application 1-3 definition 1-3 EJB rules 3-3 from Project tab 3-8 from Repository tab 3-8 generated output language 3-6 of function as menu items 9-6 options 3-11 parent objects of changed child objects 3-5, 11-1, 11-4 remote 1-2, 1-4 running in background 3-10 sample application B-2 standalone 6-2 to remote mainframe 5-3 windows 3-3 problems communications, troubleshooting of 11-1 execution, troubleshooting of 11-1, 11-3 packaging, troubleshooting of 11-1, 11-2 partitioning, troubleshooting of 11-1 procedure name option for command line C-1 process insert 2-14 properties 2-14 process name (option for command line) C-1 project options distributed application 2-4 standalone application 2-3 Project Options window 2-2, 2-17, 3-8 Project tab of Hierarchy window 3-8 preparing from 3-8 Project toolbar 2-17 properties machine 2-11 partition 2-10 process 2-14
R
-r, root rule option for command line C-1 Rebuild 4-1 analysis process 4-2 Bitmap 4-8 Changed List 4-4 Changed List Table 4-4 commit changes 4-3 Component 4-8 Enabling 4-1 Entity 4-11 Field 4-8 File 4-8 Form 4-9 from a Partition 4-12 from a partition 4-12 Help 4-9 Impact List 4-4 Mark All 4-15 Mark Prepared 4-15 Panel 4-9 Partition 4-5 partition example 4-6 performing 4-1 Physical Event 4-9 Rebuild Status 4-6 Report 4-9, 4-11, 4-13, 4-14, 4-15 Rule 4-10 running from an application configuration 4-13 running from Project tab 4-13 Section 4-10 Set 4-10, 4-11 Significant Objects 4-8 status 4-5 status table 4-6 Symbol 4-10 user interface 4-12 Values 4-10 View 4-10, 4-11 Window Content 4-11 Rebuild Status Table 4-6 recent projects, list of 2-17 region name 2-13 region, specifying 5-3 remote EJB using JNDI 9-6 Remote Method Invocation (RMI) 9-5 remote preparation 1-2, 1-4 configuring 2-12 options 5-3 remote preparation options 3-12, 5-3 remote preparation server name 3-12 Remote Preparation tab of Workbench Options 5-3 remote prepare results 5-5
Index
remote prepare support entities 5-1 languages 5-2 remote procedure calls (RPCs) 1-2 remote rule 9-5 Repository non-versioned 4-8 versioned 4-8 repository committing to 2-6 Repository tab preparing from 3-8 re-prepare 3-5, 11-1, 11-4 restrictions preparing 3-7 results interpreting 3-10 see Output window 3-10 results server name 3-12, 5-3 root rule option for command line C-1 RSvlt suffix 9-4 rule debugging 3-12 remote 9-5 rule execution 9-6 rules execution from command line C-1 Rules Language USE RULE statement 11-3 run-client command file 7-10 running sample application B-5 runtime differences 9-19 run-time parameters 9-7, C-1
Start menu 9-6 execution of application from 9-6 start page create 9-3, 9-4 load B-5 start page file 7-9 suffix servlet class 9-4 Super Prepare, using 3-4 superprepare 3-7, 3-8 supported configurations and platforms A-1 supported entities in remote prepare 5-1 supported languages in remote prepare 5-2 supported ObjectSpeak events 9-20 system identifier (HPSID) 9-22 system initialization file (hps.ini) 3-11, 3-12 system initialization file option for command line C-1
T
test execution 3-2 third-party support 3-3 Title Bar property 9-22 Tomcat configuration file 10-4 documentation 10-1 servlet container 10-1 servlet engine 6-6 toolbar configuration objects 2-6 hierarchy objects 2-6 Project 2-17 top menu caption 3-12 transaction assignment 5-2 troubleshooting application 11-1
S
-s, system ini file option for command line C-1 sample application B-1 sample schema, XML schema (samples) 9-14 SAMPLES directory B-2 SAX Parser 7-5, 8-3, 9-3 server 2-10 preparing and testing 6-7 server partitions 2-8 servlet execution parameters 9-2 servlet partition 7-8, 7-9 servlet support classes 6-6 setting database options 3-12 SOAP/XML request 9-3 SQLJ (SQL Java) 3-3, 3-5, 7-3, 8-3 standalone application default preparation settings 3-12 preparing 6-2
U
-u, database option for command line C-1 USE RULE statement 11-3 using existing bind files 3-12 USRENVn INI file 5-5
V
VALIDATE_SET value 3-10 validating sets option 3-10 verifying objects 3-10 versioning non-versioned in Rebuild 4-8 VSAM file 5-2
Index
W
Web application alias 9-3 context 9-3 start page 9-4 Web archive (WAR) 7-7, 7-9, 8-10, 10-5 Web archive (WAR) file 6-5, 6-6, 8-7, 9-2, 9-6, 10-3 Web browser B-5 Web client session, creating 9-3 Web services 2-10, 2-15, 7-8, 7-9, 9-13 invoking 9-13 testing 7-10 XML schema 9-13 WebLogic application server 6-6, 8-1 configuring 8-4 WEBSERVICE section 9-3 WebSphere Administrative Console 7-4, 7-5 Administrator Console 7-8, 7-9 application server 6-6, 7-1 configuring 7-4 documentation 7-1 start admin server 7-8, 7-9 Workbench Options Preparation 3-11, 3-12 Remote Preparation 3-12, 5-3
X
XML schema 9-13 XML schema samples 9-14
Index