Installing WebLogic on the IBM AS/400
OverviewTo 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/400To 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.
Downloading the WebLogic distribution
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/400Use ftp to move the weblversion.savf file to the AS/400.
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 usersWebLogic 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 userThe 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 fileBefore 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.
Refer to Setting WebLogic Properties for detailed information about WebLogic properties. Setting the CLASSPATH and other environment variablesBefore 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:
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 ServerThe 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:
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. Stopping the WebLogic ServerTo 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. If you need to reinstallIf 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.
Installing a new licenseThe 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. Checking your multitier connection to the databaseA 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.
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. 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. Redirecting HTTP server requests to the WebLogic ServerThe 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.
You must restart the HTTP server after you modify its configuration.
The Cloudscape JBMS evaluation kitAn 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 CenterCheck 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 WebLogicEach 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 examplesWe 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 GuideCheck 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 helpIf 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.
|