BEA Logo BEA WebLogic Server Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

Installing WebLogic on the IBM AS/400

Installation Overview
Prerequisites

Installation Steps
Downloading the WebLogic distribution
Transferring WebLogic to the AS/400
Adding WebLogic administrative users
About the WEBLOGIC user
Editing the weblogic.properties file
Setting the CLASSPATH and other environment variables
Starting the WebLogic Server
Stopping the WebLogic Server

Other features
If you need to reinstall
Installing a new license
Checking your multitier connection to the database
Setting up a JDBC connection pool for DB2
Starting the WebLogic Console
Redirecting HTTP server requests to the WebLogic Server

Release notes for WebLogic
Release notes for WebLogic for AS/400
WebLogic Developer Center for IBM AS/400e
More resources

Overview

To install WebLogic on AS/400, you need the appropriate AS/400 products from IBM installed and configured and a Windows NT workstation with connectivity to the Internet and the AS/400. Check the prerequisites listed in the next section before you begin installing.

From the WebLogic website, you download a zip archive containing an AS/400 save file. You ftp the save file to the AS/400 and then restore it and run an install script, yielding a WebLogic IFS directory.

The WebLogic Server runs on your AS/400. Some WebLogic utilities and administrative programs, such as the WebLogic Console, must execute on a Windows NT workstation since they use the graphic windowing system. You can execute these programs by mapping the WebLogic IFS directory to a drive on your workstation.

The following sections contain detailed instructions for the AS/400 installation process.

Prerequisites for running WebLogic on the AS/400

To run WebLogic, you need an AS/400 with OS/400 Version 4, Release 3 or OS/400 Version 4, Release 4. We test WebLogic on AS/400e computers with products and PTF levels described below. These are minimum requirements.

Prerequisites for OS/400 Version 4, Release 3

  1. Cumulative PTF C8230430 plus the following PTFs:

    • For the 5769-999 product: MF19847, MF19884, MF19964, MF20044, MF20078, MF20088, MF20160

    • For the 5769-SS1 product: SF50471, SF50610, SF50900*, SF51433, SF51442, SF51909*

    • For the 5769-JV1 product: SF50390, SF50401, SF50902*, SF51901, SF52067*

    You can also order Group PTF SF99066, which contains all of the PTFs listed except the following:

    • For the 5769-999 product: MF20160

    • For the 5769-SS1 product: SF51433, SF51442, and SF51909*

    • For the 5769-JV1 product: SF52067*

    *SF50900 must be applied before SF50902. SF50900 and SF51909 must be applied before SF52067.

  2. AS/400 Developer Kit for Java (5769-JV1)

  3. Qshell interpreter, option 30 of product number 5769-SS1

  4. A client workstation for WebLogic applications:

  5. (Optional) The AS/400 Toolbox for Java is not required. However, for some applications, you will need the type 4 JDBC driver from the AS/400 Toolbox for Java. Since the type 4 JDBC driver is pure Java, it allows applications running on non-AS/400 computers to access DB2 on an AS/400. For example, an applet served by the WebLogic Server must use the type 4 driver so that a browser on any platform can access DB2. A WebLogic Server running on a platform other than AS/400 would require the type 4 driver to provide three-tier JDBC or connection pool services for DB2 on an AS/400.

Prerequisites for OS/400 Version 4, Release 4

  1. Cumulative PTF C916440

  2. Group PTF #SF99067

  3. AS/400 Developer Kit for Java (5769-JV1).

  4. Qshell interpreter, option 30 of product number 5769-SS1.

  5. A client workstation for WebLogic applications:

  6. (Optional) The AS/400 Toolbox for Java is not required. However, for some applications, you will need the type 4 JDBC driver from the AS/400 Toolbox for Java. Since the type 4 JDBC driver is pure Java, it allows applications running on non-AS/400 computers to access DB2 on an AS/400. For example, an applet served by the WebLogic Server must use the type 4 driver so that a browser on any platform can access DB2. A WebLogic Server running on a platform other than AS/400 would require the type 4 driver to provide three-tier JDBC or connection pool services for DB2 on an AS/400.

Downloading the WebLogic distribution

  1. From your client workstation, download WebLogic for AS/400 from the WebLogic website. Separate distributions are provided for OS/400 V4R3 and V4R4. You can download one large .zip file or a series of files that are no larger than 10MB. If you download the series of files, you must also download a batch file that joins the separate files together into a single .zip file. The instructions for executing the batch file are on the download page on the website.

  2. Make a note of the WebLogic version that you download. The version number is part of several file and directory names. For example, WebLogic release 4.5.0 installs in the /weblogic/450 IFS directory on your AS/400. These installation instructions display the version number as "version". For example, the /weblogic/400 directory appears in these instructions as /weblogic/version.

  3. Use a 32-bit program such as WinZip to unpack the zip file.

Make sure you have room for this file on your disk before unzip it -- the unzipped file is nearly 200MB. The file expands to a file named weblversion.savf, where version is the WebLogic version number. For example, for WebLogic version 4.5.0, the file is named webl450.savf. You will transfer this file to the AS/400 next.

Transferring WebLogic to the AS/400

Use ftp to move the weblversion.savf file to the AS/400.

  1. Log into the AS/400 with an administrative account.

  2. Create a save file in the AS/400 general purpose library:
      ===> CRTSAVF FILE(QGPL/WEBLversion)

    This command creates a save file on the AS/400 where you will transfer the weblversion.savf file.

  3. At a Command Prompt on the Windows NT client computer, type:
      $ ftp AS400-hostname
      $ bin
      $ put weblversion.savf QGPL/WEBLversion

    Be sure to transfer the save file, not the .zip file! It takes 5 to 10 minutes for this last command to complete over a 10 MBit Ethernet.

  4. Log into the AS/400 with an administrative account.

    Restore the save file:

      ===> RSTLIB SAVLIB(WEBLOGIC) DEV(*SAVF) SAVF(QGPL/WEBLversion)

  5. Run the WebLogic installation script:
      ===> WEBLOGIC/INSWEBL

    The INSWEBL script does the following:

    • Creates WEBLOGIC and WLADMIN user profiles.
    • Gives WEBLOGIC and WLADMIN user profiles *ALL authority for all commands in the WEBLOGIC library.
    • Installs WebLogic and the Java programs associated with its classes, .jar files, and .zip files. The message "Restoring WebLogic Server files. Please wait." is displayed during this lengthy process.

    If the restore succeeds, the message "WebLogic Server product successfully installed." is displayed. If the restore does not succeed, the message "WebLogic Server product did not install successfully." is displayed.

  6. If you want, you can delete the save file with this command:
      ===> DLTF FILE(QGPL/WEBLversion)

    On your Windows NT workstation, you can also delete the .zip file you downloaded and the weblversion.savf file.

  7. The WEBLOGIC/INSWEBL program (*PGM) and command (*CMD) are shipped with public authority set to *USE. Once the install has been run successfully, the administrator may set the authority on these objects to PUBLIC *EXCLUDE.

Your AS/400 now has a WebLogic IFS directory containing the WebLogic Java classes as well as configuration files and example programs.

The Java classes are transformed with the AS/400 Java transformer with level 40 optimization, so AS/400 direct executables for WebLogic are used.

Adding WebLogic administrative users

WebLogic administrative users have *ALL authority for the commands in the WEBLOGIC library and *RWX authority on certain files in the /weblogic directory. To allow a user to start and stop the server or to modify any of these files, you can add GRPPRF(WLADMIN) to their profiles.

To create a new user with authority to administer WebLogic, use this command:

  ===> CRTUSRPRF USRPRF(USERNAME) GRPPRF(WLADMIN)

To add authority to administer WebLogic to an existing user, use this command:

  ===> CHGUSRPRF USRPRF(USERNAME) GRPPRF(WLADMIN)

About the WEBLOGIC user

The WEBLOGIC/INSWEBL command creates the WEBLOGIC user profile with authorizations of *NONE. You cannot log in as WEBLOGIC. However, you can add users to the WLADMIN group, allowing them to start the WebLogic Server.

Editing the weblogic.properties file

Before you start the WebLogic Server the first time, you will need to edit your weblogic.properties file and set a system password. The weblogic.properties file is located in the /weblogic/version directory.

The properties file is an ASCII stream file. See Editing stream files for notes about editing stream files.

  1. Edit /weblogic/version/weblogic.properties in your editor.

  2. Search for "weblogic.password.system".

  3. Type the system password you want to use to the right of the equals sign.
      weblogic.password.system=yourPassword

  4. Scan the remainder of the properties file and modify other properties as needed.

  5. Save your changes.

Refer to Setting WebLogic Properties for detailed information about WebLogic properties.

Setting the CLASSPATH and other environment variables

Before you start the WebLogic Server, you must add the WebLogic classes to the CLASSPATH environment variable. The CLASSPATH environment variable differs between OS/400 V4R3 and OS/400 V4R4. The JVM on OS/400 V4R3 has a 2MB limit for Java .jar files. Because of this, the weblogicaux.jar file on V4R3 is supplied as three separate jar files.

The CLASSPATH environment variable for the session in which you run WebLogic must contain these classes:

OS/400 V4R3

  • /weblogic/version/classes
  • /weblogic/version/lib/weblogicaux0.jar
  • /weblogic/version/lib/weblogicaux1.jar
  • /weblogic/version/lib/weblogicaux2.jar
  • /weblogic/version/license

OS/400 V4R4

  • /weblogic/version/classes
  • /weblogic/version/lib/weblogicaux.jar
  • /weblogic/version/license

You must also set the QIBM_MULTI_THREADED environment variable to 'Y' before you run STRWEBL, JAVA, or RUNJAVA commands or the java command in an interactive Qshell shell.

You can enter the CLASSPATH as a parameter when you run the STRWEBL CL command. Or you can use ADDENVVAR to add variables to your environment, CHGENVVAR to change an environment variable, or WRKENVVAR to add or modify variables in the environment.

Here is how to set the CLASSPATH and other variables on the AS/400 using ADDENVVAR or Qshell and on a Windows NT workstation. (The commands are displayed on several lines here for clarity, but they should be typed without line breaks when you enter them.)

Setting environment variables with the CL ADDENVVAR command

The following commands set the CLASSPATH and QIBM_MULTI_THREADED environment variables in an AS/400 (OS/400 V4R3) session:

  ===> ADDENVVAR ENVVAR(CLASSPATH) VALUE(
       '.:/weblogic/version/classes:
       /weblogic/version/lib/weblogicaux0.jar:
       /weblogic/version/lib/weblogicaux1.jar:
       /weblogic/version/lib/weblogicaux2.jar:
       /weblogic/version/license')
  ===> ADDENVVAR ENVVAR(QIBM_MULTI_THREADED) VALUE('Y')

On an OS/400 V4R4 computer, only the single /weblogic/version/lib/weblogicaux.jar file is included in the CLASSPATH.

Setting environment variables in Qshell

If you set environment variables in your session before you start Qshell, the variables remain set in Qshell, unless a .profile file in your home directory or the /etc/profile file resets environment variables.

You can set environment variables for every interactive Qshell shell you start with STRQSH or QSH by setting the CLASSPATH in the .profile file in your home directory. An administrator can set environment variables globally by adding them to the /etc/profile file, which is executed whenever any user starts a Qshell shell with the STRQSH or QSH commands.

To set environment variables in Qshell, use these commands at the prompt, or add them to one of the profile files:

$  export -s CLASSPATH=.:/weblogic/version/classes:
      /weblogic/version/lib/weblogicaux0.jar:
      /weblogic/version/lib/weblogicaux1.jar:
      /weblogic/version/lib/weblogicaux2.jar:
      /weblogic/version/license
$  export -s QIBM_MULTI_THREADED=Y

On OS/400 V4R4, substitute /weblogic/version/lib/weblogicaux.jar for the three separate .jar files.

Setting CLASSPATH on a workstation with Client Access

You must set the CLASSPATH environment variable on a workstation running WebLogic classes from the AS/400. The QIBM_MULTI_THREADED environment variable is needed only when you are running Java classes in the AS/400 VM.

In this OS/400 V4R3 example, AS400SRVR is the name of the AS/400 server where WebLogic is installed.

 C:\>SET CLASSPATH=%CLASSPATH%://AS400SRVR/weblogic/version/classes:
      //AS400SRVR/weblogic/version/lib/weblogicaux0.jar:
      //AS400SRVR/weblogic/version/lib/weblogicaux1.jar:
      //AS400SRVR/weblogic/version/lib/weblogicaux2.jar:
      //AS400SRVR/weblogic/version/license

If you need help on setting your CLASSPATH, check our Administrators Guide, Setting classpath.

Starting the WebLogic Server

The WEBLOGIC/STRWEBL command starts the WebLogic Server. This command changes to the WEBLOGIC account before it starts the server. This is important because objects the server creates belong to the WEBLOGIC account. If you start the server using a method other than the WEBLOGIC/STRWEBL command, you may experience problems with permissions.

Here is how to start WebLogic with the WEBLOGIC/STRWEBL command:

  1. Log into the AS/400 with an account that is a member of the WLADMIN group.

  2. Change to the /weblogic/version directory:
      ===> CD '/WEBLOGIC/version'

  3. Make sure that the CLASSPATH variable is set as described in the previous section.

  4. Start the WebLogic Server with the following CL command:
      ===> WEBLOGIC/STRWEBL

  5. In the "Name of WebLogic Server" field, enter "myserver" (the default shipped with WebLogic).

  6. If you want to run the WebLogic Server in the background, change the "Submit" field to *YES.

  7. Modify any of the other parameters as needed. For parameter such as CLASSPATH, there may not initially be enough room to enter the entire value. You can expand a line by entering an ampersand (&) before you enter the value. Keep entering & until there is enough room to enter your value. Press Enter to execute the command.
If you start the WebLogic Server interactively (Submit set to *NO) do not press F3 or F12 to exit the Java Command Entry Screen until you see a message similar to this:
Mon Sep 14 14:24:48 GMT+00:00 1998:
<I> <WebLogicServer> Shutdown completed
Java program completed

See the WebLogic Administrators Guide for detailed instructions on administering WebLogic, including Setting up WebLogic as an HTTP server. WebLogic has extensive properties to give you a fine degree of control its operation. Also read about the property-related changes in the release notes for WebLogic.

Top of the page

Stopping the WebLogic Server

To shut down the WebLogic Server, enter the ENDWEBL command:

  ===> WEBLOGIC/ENDWEBL

Enter the WebLogic system password, and then press Enter to continue.

Wait until you see a message similar to the following.


T3://127.0.0.1:7001 successfully shutdown
Shutdown sequence initiated
Java program completed

After this message appears, you can press F3 to exit the Java Command Entry Screen and return to the AS/400 Command Entry screen.

Top of the page

If you need to reinstall

If you encounter problems installing WebLogic and you want to try reinstalling, you do not have to delete WebLogic, but you do have to delete the WEBLOGIC library and restore from the save file again.

  1. Delete the WEBLOGIC library:
      ===> DLTLIB WEBLOGIC

  2. Restore from the save file:
      ===> RSTLIB SAVLIB(WEBLOGIC) DEV(*SAVF) SAVF(QGPL/WEBLversion)

  3. Run INSWEBL again:
      ===> WEBLOGIC/INSWEBL

Top of the page

Installing a new license

The evaluation license included in the WebLogic package that you download is enabled for a 30-day evaluation period, so you can start using WebLogic immediately. To use WebLogic beyond that 30-day evaluation period, you will need to contact sales to purchase a license for each IP address on which you intend to use WebLogic.

When you purchase a license, you will receive an email with a license key for each IP address. You add those keys to the /weblogic/version/WebLogicLicense.java file and recompile the file. See Installing a WebLogic license for help in editing the WebLogicLicense.java file.

A CL command, LICWEBL, is included in the AS/400 WebLogic distribution to complete the steps to install the license file. After you have edited WebLogicLicense.java, execute LICWEBL:

 ===> WEBLOGIC/LICWEBL

The WebLogicLicense.java file must be in the /weblogic/version directory when you execute LICWEBL.

LICWEBL compiles WebLogicLicense.java to a class file in the /weblogic/version/classes directory, creates a direct executable for the class, and sets the correct ownership and permissions.

Top of the page

Checking your multitier connection to the database

A multitier JDBC connection allows clients to access a database, such as DB2, through the WebLogic Server. Clients connect to WebLogic using a T3 connection. The WebLogic Server accesses DB2 using one of IBM's JDBC drivers.

To check a multitier connection via the WebLogic Server to DB2, use utils.t3dbping. The general syntax for this utility is:

  java utils.t3dbping WebLogicURL USER PASS DB driverClass driverURL

For example, the following CL command tests a connection to the DEMODB database using IBM's JDBC driver:

  ===> JAVA CLASS(utils.t3dbping) PARM('t3://AS400SRV:7001', 'nick', 
       'BIGseCreT' 'DEMODB' 'com.ibm.db2.jdbc.app.DB2Driver'
       'jdbc:db2://AS400SRV/DEMODB'

Here is the Qshell version of the utils.t3dbping command:

  % java utils.t3dbping t3://AS400SRV:7001 nick BIGseCreT
    DEMODB com.ibm.db2.jdbc.app.DB2Driver jdbc:db2://AS400SRV/DEMODB 

There are more detailed instructions in Testing connections.

Top of the page

Setting up a JDBC connection pool for DB2

A connection pool is a multitier JDBC connection where a client connects to the WebLogic Server using WebLogic JDBC and the WebLogic Server connects to a database (in this case DB2) on behalf of the client. With a connection pool WebLogic creates a pool of connections at startup time. When a T3 client requests a connection, the WebLogic Server allocates a connection from the pool to the client. When the T3 client closes the connection, WebLogic returns the still-open DB2 connection to the connection pool.

See Using WebLogic JDBC for instructions for setting up a connection pool. The WebLogic for IBM AS/400e Technical FAQ offers specific help for setting up a connection pool for DB2.

Top of the page

Starting the WebLogic Console

Once the Server is running, you can start the WebLogic Console on your client workstation. There are detailed instructions on running the console in the WebLogic Administrators Guide, Running the WebLogic Console.

On the Windows NT command line, enter:

 $ java -ms32m -mx32m weblogic.Console

Enter the AS/400 computer's name and the WebLogic system password to get a connection.

Note that the Console does not run under Microsoft SDK for Java. If you are using Microsoft SDK for Java on the Windows NT workstation, you should run the Console with the "java" command.

Top of the page

Redirecting HTTP server requests to the WebLogic Server

The WEBLOGIC/GOWEBL.SRVPGM program is a plug-in for the AS/400 HTTP server that allows you to redirect some HTTP requests to the WebLogic Server.

To enable redirects, you modify the HTTP server's configuration file and add a directive to initialize the GOWEBL.SRVPGM plug-in.

  1. Run the CFGTCPHTTP CL command.

  2. Choose "Work with HTTP Configuration," item 2 on the menu.

  3. Press Enter to edit the CONFIG file.

  4. Press PageDown until you find the Mapping Directives section.

  5. After the comments in the Mapping Directives section, add a ServerInit directive. This directive should be entered on one line:
    ServerInit /QSYS.LIB/WEBLOGIC.LIB/GOWEBL.SRVPGM:wl_init
            WebLogicHost:7001:

    Replace WebLogicHost with the name of the computer running the WebLogic Server. If the WebLogic Server is not listening on port 7001 on that computer, change the port number also.

  6. Add Service and Pass directives, as defined in the Webmaster's Guide. For example, adding the following two lines forwards requests for files in the /weblogic/servletimages directory to WebLogic via GOWEBL.SRVPGM. The first two lines shown are a single CONFIG line.
    Service /weblogic/servletimages/*
            /QSYS.LIB/WEBLOGIC.LIB/GOWEBL.SRVPGM:wl_proxy
    Pass /weblogic/servletimages/*
    

  7. Save your changes.

You must restart the HTTP server after you modify its configuration.

More resources

The Cloudscape JBMS evaluation kit

An evaluation version of Cloudscape's JBMS pure-Java database is included in the /weblogic/version/eval/cloudscape directory. The Cloudscape database is used in the WebLogic Tour and some of the EJB examples. You can try out the database for your own projects; be sure to add /weblogic/version/eval/cloudscape/lib/cloudscape.jar to the Java system classpath before you start the WebLogic Server. For installation and use instructions, check the documentation for Cloudscape at their website.

WebLogic provides extensive documentation and other resources online. Here are general references from the WebLogic documentation.

WebLogic AS/400 Developer Center

Check out the helper documents in this section that offer tips on getting your database connection set up, getting a permanent license installed, etc.

Documentation for WebLogic

Each API has a Developers Guide and a relevant section in the WebLogic API Reference Manual. The Developers Guides contain an overview of the API, its place in WebLogic, and an extensive implementation guide with code examples. The API Reference contains package/class/method-level documentation.

Click the WebLogic Server Documentation button on the toolbar at the top of the page for details on all of WebLogic's documentation options.

Code examples

We also ship many code examples in the distribution that will help you get started. Code examples are located in the weblogic/examples/ directory in the distribution, and also on the website.

When you try the examples, you must account for differences in the AS/400 operating system and security environment. Read the WebLogic for IBM AS/400e Technical FAQ for details about these differences.

WebLogic Administrators Guide

Check the WebLogic Administrators Guide for more information on setting up, configuring, maintaining, and running the WebLogic Server, the WebLogic Console, the ZAC Publish Wizard, and the EJB Deployment Wizard. Note that changes in administration are detailed in the release notes for WebLogic.

More help

If you have questions or need help, check the Customer support page. We also host several newsgroups for support.

 

Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
Last updated 08/31/1999