Developer's-Panther WebSphere


Chapter 2. Configuring Machines

This chapter describes the process for configuring the machines that work with your Panther software components:


How to Set Up the Application Server Engine

The following flowchart illustrates the process for setting up the Panther application server engine on a machine running WebSphere Application Server:

Installing Panther Software

The Panther for IBM WebSphere Installation Guide describes the process for installing Panther software on application server machines for UNIX and Windows platforms.

How to Install Panther Software

  1. Install the application server engine on the machine.
  2. Add the Panther database driver for the selected database to the Panther installation.
  3. Specify the location of the Panther installation in the SMBASE environment variable.

Updating Your WebSphere Configuration

Your application server machine should already have installed:

After installing Panther, certain settings in WebSphere must be changed to recognize the Panther software.

How to Update Your WebSphere Configuration

  1. Specify the location of the JDK installation in the JAVA_HOME environment variable.
  2. Include $JAVA_HOME/bin in the PATH environment variable.
  3. Specify the location of the WebSphere installation in the WAS_HOME environment variable.

    On Windows systems, a typical setting is C:\WebSphere\AppServer.

  4. Include $WAS_HOME/bin in the PATH environment variable.
  5. In the WebSphere Administrative Console, set the classpath to include $SMBASE/config/pro5.jar and $SMBASE/servlet/proweb.jar. For Windows systems, the installer performs this step.

    ($SMBASE/config/pro5.jar contains Panther's Java classes. $SMBASE/servlet/proweb.jar contains Panther's Java servlet classes.)

  6. Specify the location of the Panther shared libraries. (For Windows systems, the installer performs this step.)
  7. Include $SMBASE/util in the PATH environment variable. This utilities directory provides access to Panther's license and makeejb utilities.

    For Windows, the installer copies the license DLL (lmgr325.dll) to the Windows system directory.

Configuring Panther Initialization

Each Panther/WebSphere application has an initialization file, panther.ini. The default file, located in the config directory, contains three sections:

How to Edit Global Panther Settings

  1. Open $SMBASE/config/panther.ini. Since all Panther/WebSphere applications must share the same global settings, edit the default file.
  2. If necessary, update the settings in [EJB Global] to new values.
  3. In the [databases] section, enter the database settings for your application.

    Note: For Windows, the installer updates the global settings in panther.ini.

EJB Global Settings

The EJB Global section of panther.ini contains the following configuration settings, listed alphabetically.

LM_LICENSE_FILE
Specify the location of the Panther license file. By default, the license file is located in $SMBASE/licenses/license.dat. (Mandatory)

SMBASE
Specify the location of the Panther installation. (Mandatory)

SMINITJPL
Specify the name of the JPL file loading shared libraries at startup. (This JPL file cannot include other JPL commands, only calls to sm_slib_load and sm_slib_install. For more information, refer to Appendix C, "Adding C Functions.")

SMTPCLIENT
For Tuxedo applications, specify whether Tuxedo connectivity will be enabled in the application. If unset, the shared libraries needed for Tuxedo will not be loaded. If Tuxedo libraries are needed, set this variable to native or workstation, for native or workstation clients respectively.

SMTPINIT
For Tuxedo applications, specify the default arguments to the client_init command.

SMTPJIF
For Tuxedo application calls, specify the name of the JIF file in the Tuxedo application.

SMVARS
Specify the location of the SMVARS file.

EJB Class Settings

The EJB Class section of panther.ini contains the following configuration settings, listed alphabetically.

SMFLIBS
Specify the Panther application libraries to open on application startup. The default setting is to open server.lib, located in the same directory as panther.ini. (Mandatory)

SMINITJPL
Specify the name of the JPL file to run at application startup.

SMMSGS
Specify the location of the message file.

SMPATH
Specify the search path for your Panther application files.

Database Settings

The databases section of panther.ini specifies which database drivers to load with your Panther applications. List the database drivers to load in the installed section, by database keyword:

installed=DB2_6

If more than one database driver is needed, you must also specify the default driver. For example:

default=DB2_6
installed=DB2_6, oracle8iProC

Creating an Application Server

WebSphere documentation recommends that you create a new application server for each application. Within that application server, you must also create a container for your EJBs. (In WebSphere, the name of the default application server is server1.)

How to Create an Application Server

  1. Start the WebSphere server.
  2. Start the WebSphere Administrative Console.

  3. Create a new directory on the server machine for your Panther/WebSphere application. Set this directory to have write permissions.
  4. Specify the directory created in Step 3 as the Working Directory in the Process Definition property of the application server.
  5. Add Panther as a shared library.
  6. Add the Panther library to the class loader.

  7. Install the application.
  8. Add the deployed jar file to the CLASSPATH.

Copying Files to the Application Server

The application server's Working Directory must contain the files necessary to deploy Panther-built EJBs:

How to Set Up the Panther Application Files

  1. Go to the application server's working directory.
  2. From $SMBASE/config, copy panther.ini and check the following settings:
  3. In the Panther editor, if your development workstation has WebSphere installed, specify this directory in the EJB section of the Component Interface window. (As a result, the EJBs Java files are generated in this directory.)
  4. After you build service components in the Panther editor, create or copy the Panther application library containing the service components to this directory. By default, this library is named server.lib.

Creating a Server Log File

You can send server messages to a log file. Because of performance considerations, this is not suggested for application deployment, only for application testing.

How to Activate Server Message Logging

  1. Place a file named server.log in the application server's working directory.
  2. Messages are automatically written to this file when a component is created and destroyed and when an error message is generated.
  3. Write additional messages to this file using the JPL log command or its C equivalent sm_log.

Sample Error Log

The following sample log file illustrates some server messages:

Mon Jun 21 22:06:30 2016: Component cCustomers
Created.
Mon Jun 21 22:06:44 2016: Component cCustomers, Method GetCustomer
Searching on S
Mon Jun 21 22:06:50 2016: Component cCustomers
Destroyed.
Mon Jun 21 22:07:03 2016: Component cCustomers
Created.
Mon Jun 21 22:08:07 2016: Component cCustomers
Destroyed.

How to Set Up the Development Client

There are three type of development clients:

The following flowchart illustrates the process for setting up development clients:

Installing Panther Software

The Panther for IBM WebSphere Installation Guide describes the process for installing Panther software for development clients and database drivers on UNIX and Windows platforms.

Installing Panther client software allows you to run the Panther editor where you build your client screens and EJBs and store them in Panther application libraries.

Installing a database driver allows your development clients running the editor to make direct connections to the database. Direct connections are required for creating a repository and are also helpful for testing purposes.

Configuring Your Panther Client Environment

As part of the installation process, certain environment settings must be specified.

How to Configure Your Panther Client Environment

  1. For Java compilation and testing:
  2. Set SMJVMOPT with the settings for the JVM.

    A UNIX/Linux example:

    export SMJVMOPT="\"-Dcom.ibm.CORBA.ConfigURL=$WAS_HOME/properties/sas.client.props\"
    \"-Dcom.ibm.SOAP.ConfigURL=$WAS_HOME/properties/soap.client.props\"
    -Dcom.ibm.CORBA.RasManager=com.ibm.websphere.ras.WsOrbRasManager
    -Dwas.install.root=\"$WAS_HOME/\"
    -Djava.ext.dirs=\"$WAS_HOME/java/jre/lib/ext:$WAS_HOME/java/lib:$WAS_HOME/classes:$WAS_HOME/lib:$WAS_HOME/lib/ext:$WAS_HOME/web/help:$WAS_HOME/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime:/opt/mqm/java/lib:/opt/wemps/java/lib\"
    -Djava.security.auth.login.config=\"$WAS_HOME/properties/wsjaas_client.conf\"
    -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContentFactory
    -Xbootclasspath/p:\"$WAS_HOME/java/jre/lib/ext/ibmorb.jar:$WAS_HOME/java/jre/lib/ext/ibmext.jar\""
    
    

    A Windows example:

    set SMJVMOPT="\"-Dcom.ibm.CORBA.ConfigURL=%WAS_HOME%\properties\sas.client.props\"
    \"-Dcom.ibm.SOAP.ConfigURL=%WAS_HOME%\properties\soap.client.props\"
    -Dcom.ibm.CORBA.RasManager=com.ibm.websphere.ras.WsOrbRasManager
    -Dwas.install.root=\"%WAS_HOME%\\"
    -Djava.ext.dirs=\"%WAS_HOME%\java\jre\lib\ext;%WAS_HOME%\java\lib;%WAS_HOME%\classes;%WAS_HOME%\lib;%WAS_HOME%\lib\ext;%WAS_HOME%\web\help;%WAS_HOME%\deploytool\itp\plugins\com.ibm.etools.ejbdeploy\runtime;\opt\mqm\java\lib;\opt\wemps\java\lib\"
    -Djava.security.auth.login.config=\"%WAS_HOME%\properties\wsjaas_client.conf\"
    -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContentFactory
    -Xbootclasspath/p:\"%WAS_HOME%\java\jre\lib\ext\ibmorb.jar;%WAS_HOME%\java\jre\lib\ext\ibmext.jar\""
  3. Set the server name and port number in SMPROVIDERURL of the server running WebSphere Application Server, as in:
    corbaname:iiop:machine:2809#cell/nodes/machine/servers/server
  4. Set SMBASE to the location of the Panther installation. For Windows platforms, this is set in prol5w32.ini. For UNIX platforms, this is set in the environment.
  5. Set SMFLIBS to the Panther application libraries needed to save your client screens and service components. The default names of these libraries are client.lib and server.lib. For Windows platforms, this is set in prol5w32.ini. For UNIX platforms, this is set in the environment.
  6. In order to test EJBs, you need to add the following to the CLASSPATH setting:
  7. For HP-UX, set SMJAVALIBRARY and LD_PRELOAD. For example:

Configuring Your Panther Database Drivers - UNIX

On UNIX systems, in order for the Panther editor to connect to the database during development, you must configure database access in prol5unix.ini.

How to Configure Your Panther Database Drivers on UNIX

  1. Open $SMBASE/config/prol5unix.ini.
  2. Add the database keyword to the Installed= line. Panther for IBM WebSphere has the following database keywords available on UNIX:

    Keyword Description

    DB2_6

    DB2

    oracle8iProC

    Oracle 8i for ProC

    oracle8iOCI

    Oracle 8i for OCI

  3. If you install more than one database driver, you must also update the default= line and specify the default driver.
  4. Set SMPATH to include the directory with the prol5unix.ini location, by default $SMBASE/config.

Creating Application Libraries

The Panther distribution includes two application libraries, client.lib and server.lib in the config directory. However, it is recommended that you create your application libraries outside of your Panther distribution.

If you are a native or local development client, you can create the application libraries in the application server's working directory.

How to Create Client Application Libraries

  1. In the Panther editor, choose FileNewCreate Library.
  2. Enter its name, for example client.lib.

How to Create Server Application Libraries

  1. In the Panther editor, choose FileNewCreate Library.
  2. Enter its name, for example server.lib.

How to Set Up the Web Application Broker

The following flowchart illustrates the process for setting up HTTP servers.

Installing Panther Software

The Panther for IBM WebSphere Installation Guide describes the process for installing Panther software for HTTP server machines on UNIX and Windows platforms.

The HTTP server for most development configurations is on the same machine as WebSphere Application Server. Therefore, the WebSphere files will already be available. In this case, install the Panther web application broker in the same location as the Panther application server engine.

Installing WebSphere

If WebSphere is not on the HTTP server machine, you must install WebSphere Developer's Client Files.

Copying Client Libraries

The Panther web application broker acts as an application client. Therefore, it will need access to the client application libraries, such as client.lib. If WebSphere Application Server and the HTTP server are on the same machine, use the application server's working directory for the client files.

How to Set Up the Application Libraries for the Web

  1. Go to the application server's working directory.
  2. Copy client.lib to this directory.

Creating a Web Initialization File

Panther web applications have an initialization file containing the web application's environment settings and file locations. In that initialization file, you need to specify the location of your application files, of your Panther web application broker executables, and the environment settings for the web application.

This initialization file specifies the runtime environment for the Panther web application broker; settings are not read from the environment.

Note: Web initialization files must contain the full path name for Panther, WebSphere and Java installations. Environment variables cannot be expanded.

How to Create a Panther Web Initialization File

  1. Run the Web Setup Manager, Panther's web application utility. For more information, refer to Appendix B, "Web Setup Manager,"in the Web Development Guide.
  2. (UNIX only) Under Shared Library Path on the Environment Settings window, set LD_LIBRARY_PATH to include $SMBASE/lib, $WAS_HOME/bin, and the JVM shared libraries.
  3. Under Path on the Environment Settings window, set PATH to include:
  4. On the Additional Environment Variables window:
  5. If you need to edit or view the file, Panther places the web initialization files in ~proweb/ini on UNIX servers and the Windows directory (for example, C:\Winnt) for Windows servers.

Configuring Java Servlet Access

Instead of using the CGI protocol to access a web application, you can configure the web application to run as a Java servlet. For this configuration, WebSphere Application Server needs to know the location of the Panther classes for Java servlets.

If WebSphere Application Server and the HTTP server are on the same machine, this was done as part of the application server configuration (see Step 4.).

If the HTTP server is on a separate machine, you will need to update the machine's CLASSPATH variable.

How to Update Your Java Servlet Configuration

  1. On separate HTTP servers, add the name and location of the Panther Java classes, proweb.jar, to the CLASSPATH variable for WebSphere. For example:
    	UNIX   CLASSPATH=/usr/panther/servlet/proweb.jar
    Windows CLASSPATH=C:\Panther\servlet\proweb.jar
  2. Add the name and location of the Panther Java classes, proweb.jar, to the CLASSPATH variable for Panther's web application broker. (In the previous section, see Step 4.)