|
|
|
|
|
Configuring and Administering the BEA WebLogic Java Adapter for Mainframe Gateway
BEA WebLogic Java Adapter for Mainframe (JAM) is configured with the JCRMGW configuration file. Configuration parameters define remote domains, the SNACRM, Local LU and SNA stack library, SNA links, and local and remote services.
JAM may be administered through the JAM Administration Servlet, which allows you to start and stop the gateway through a graphical user interface.
The following topics provide instructions and information for configuring and administering JAM:
General Steps for Defining the Gateway Configuration
Whether you are defining a new gateway configuration or modifying an existing one, both processes are similar. Defining a gateway configuration requires the following steps:
Note: Refer to About the JCRMGW Configuration File and its sub-sections for detailed information about the keywords you need to define in your configuration file.
If you use the default startup script for WebLogic Server 6.0, you must make sure the jcrmgw.cfg file is located in the directory where WebLogic Server 6.0 is installed.
Note: Refer to Locating the Gateway Configuration File for more information.
You must add the JAM startup class to the WebLogic Server configuration file, config.xml.
Note: Refer to Adding the JAM Startup Class to the WebLogic Server Configuration File for more information.
After you perform these steps, you are ready to start the WebLogic Server and verify that the gateway is ready. Refer to Post Configuration Requirements for more information about verifying that the gateway is ready.
About the JCRMGW Configuration File
The JAM Gateway, JCRMGW, uses the jcrmgw.cfg file to control much of its operation. The JCRMGW configuration file defines the SNACRM, stack (if required), links, and local and remote services that comprise the gateway environment. This file must be created and located in the WebLogic installation directory. A sample jcrmgw.cfg file is located in the JAM examples/sample.jar referred to in the BEA WebLogic Java Adapter for Mainframe Installation Guide.
The general format of the jcrmgw.cfg configuration file is as follows:
JCRMGW Configuration File Sections
The following sections describe the significant keywords within specific sections of the jcrmgw.cfg file that define new gateway configurations.
JC_REMOTE_DOMAINS Section
This section of the jcrmgw.cfg file provides an alias for associating mainframe applications with services and links. Any given entry in this section must be named. A name is provided by using a label on any one of the keywords that comprise the entry. Code examples will use a label on the first keyword of a given entry.
Valid Keywords
Following is a list of valid keywords for the JC_REMOTE_DOMAINS section:
|
Keyword |
Required/Optional |
Description |
|---|---|---|
|
DOMAINID |
Required |
Name of a partner system |
Following is more detailed information about the JC_REMOTE_DOMAINS section keyword:
JC_SNACRM Section
This section of the jcrmgw.cfg file identifies the SNACRM that this gateway talks to. There is one SNACRM for each JCRMGW. Any given entry in this section must be named. A name is provided by using a label on any one of the keywords that comprise the entry. Code examples will use a label on the first keyword of a given entry.
Valid Keywords
Following is a list of valid keywords for the JC_SNACRM section:
|
Keyword |
Required/Optional |
Description |
|---|---|---|
|
GROUP |
Required |
Name of group correlating gateway with SNACRM |
|
SNACRMADDR |
Required |
Symbolic TCP address |
Following is more detailed information about the JC_REMOTE_DOMAINS section keywords:
JC_SNASTACKS Section
This section of the jcrmgw.cfg file identifies the Local LU used for the SNACRM along with the stack identifier for the SNA stack library to be used. Only one local LU and one stack can be specified for a SNACRM. Any given entry in this section must be named. A name is provided by using a label on any one of the keywords that comprise the entry. Code examples will use a label on the first keyword of a given entry.
Valid Keywords
Following is a list of valid keywords for the JC_SNASTACKS section:
|
Keyword |
Required/Optional |
Description |
|---|---|---|
|
LOCALLU |
Required |
Alias of local LU to be used with SNACRM |
|
STACKTYPE |
Required |
Name of SNA stack support library to load |
Following is more detailed information about the JC_SNASTACKS section keywords:
JC_SNALINKS Section
This section of the jcrmgw.cfg file identifies partner mainframe application regions. Multiple links for a single SNACRM are supported. Any given entry in this section must be named. A name is provided by using a label on any one of the keywords that comprise the entry. Code examples will use a label on the first keyword of a given entry.
Valid Keywords
Following is a list of valid keywords for the JC_SNALINKS section:
|
Keyword |
Required/Optional |
Description |
|---|---|---|
|
MAXSESS |
Optional |
Maximum number of SNA sessions that can be started for a link |
|
MINWIN |
Optional |
Minimum number of SNA sessions that will be contention winners |
|
MODENAME |
Required |
Name of mode definition |
|
RDOM |
Required |
Name of remote domain |
|
RLUNAME |
Required |
Alias for remote LU |
|
SECURITY |
Optional |
Indicates level of security |
Following is more detailed information about the JC_SNALINKS section keywords:
JC_LOCAL_SERVICES Section
This section of the jcrmgw.cfg file maps incoming mainframe program names to a Home interface for an EJB that will service the request. Any given entry in this section must be named. A name is provided by using a label on any one of the keywords that comprise the entry. Code examples will use a label on the first keyword of a given entry.
Valid Keywords
Following is a list of valid keywords for the JC_LOCAL_SERVICES section:
|
Keyword |
Required/Optional |
Description |
|---|---|---|
|
RNAME |
Required |
Name of remote resource associated with a service |
|
SCHEMA |
Required for use with WebLogic Process Integrator |
Identifies the generated dataview. |
Following is more detailed information about the JC_LOCAL_SERVICES section keyword:
JC_REMOTE_SERVICES Section
This section of the jcrmgw.cfg file maps remote mainframe program names to method names that can be used by a local application to invoke the remote request. Any given entry in this section must be named. A name is provided by using a label on any one of the keywords that comprise the entry. Code examples will use a label on the first keyword of a given entry.
Valid Keywords
Following is a list of valid keywords for the JC_REMOTE_SERVICES section:
|
Keyword |
Required/Optional |
Description |
|---|---|---|
|
FUNCTION |
Optional |
Method of request invocation accepted by the mainframe |
|
RDOM |
Required |
Name of remote domain |
|
RNAME |
Required |
Remote resource name associated with a service |
|
SCHEMA |
Required for use with WebLogic Process Integrator |
Identifies the generated dataview. |
|
TRANTIME |
Optional |
Maximum number of milliseconds client will allow for a host request to respond |
Following is more detailed information about the JC_REMOTE_SERVICES section keywords:
Sample Configuration File
The following example illustrates a basic jcrmgw.cfg file.
Listing 3-1 Sample jcrmgw.cfg Configuration File
*JC_REMOTE_DOMAINS
#
CICS410 DOMAINID="410"
#
*JC_SNACRM
#
SNACRMAN SNACRMADDR="//dalnt66:8650"
GROUP="SNAG1"
*JC_SNASTACKS
#
IBMCSAIX STACKTYPE="IBM50"
LOCALLU="LUNT66B"
#
*JC_SNALINKS
#
C41XB01 RLUNAME="C410XB01"
RDOM="CICS410"
MODENAME="SMSNA100"
MAXSESS=8
MINWIN=6
#
*JC_LOCAL_SERVICES
#
TraderHome RNAME="DPL1SVR"
#
JC_REMOTE_SERVICES
DPLINIT RDOM="CICS410"
RNAME="PRIM:DPLINIT"
TRANTIME=10000
TOUPPER RDOM="CICS410"
RNAME="TOUPDPLS"
TRANTIME=10000
demoRead RDOM="CICS410"
RNAME="DPLDEMOR"
TRANTIME=10000
demoUpdate RDOM="CICS410"
RNAME="DPLDEMOU"
TRANTIME=10000
demoCreate RDOM="CICS410"
RNAME="DPLDEMOC"
TRANTIME=10000
demoDelete RDOM="CICS410"
RNAME="DPLEMOD"
TRANTIME=10000
imsInsert RDOM="IMS51"
FUNCTION=DTP
RNAME="IMSSVR12"
Special Configuration Considerations for WebLogic Server 6.0
If you are running JAM with WebLogic Server 6.0,you must make sure the jcrmgw.cfg file is available to the default startup script for WebLogic Server 6.0 and you must add the JAM startup class to the WebLogic Server configuration file.
Locating the Gateway Configuration File
WebLogic Server 6.0 supports multiple configured domains. The locations of the XML files that comprise the configuration are kept in the following location:
<bea_home>/<wls_install>/config/<domain_name>
If you use the default startup script for WebLogic Server 6.0, startWebLogic, the jcrmgw.cfg file must be located in the installation directory from which WebLogic Server is started. This script is located in the following installation directory:
<bea_home>/<wls_install>/
Adding the JAM Startup Class to the WebLogic Server Configuration File
The JAM Startup Class, com.bea.sna.jcrmgw.gwboot, must be added to the WebLogic Server 6.0 configuration file called config.xml before you start JAM. Refer to the BEA WebLogic Server Administration Guide at http://download.oracle.com/docs/cd/E13222_01/wls/docs60/adminguide/index.html for detailed information about administration of the WebLogic Server. Specific instructions for adding a Startup Class to the configuration can be found at http://download.oracle.com/docs/cd/E13222_01/wls/docs60/ConsoleHelp/startupclass.html.
XML similar to the following for specifying the JAM Startup Class, com.bea.sna.jcrmgw.gwboot,should be added to the WebLogic Server 6.0 config.xml file:
Listing 3-2 XML Code for Specifying the Startup Class for WebLogic Server 6.0
<StartupClass
Arguments="-r -noexit"
ClassName="com.bea.sna.jcrmgw.gwboot"
Name="jcrmgw"
Targets="myserver"
/>
This XML illustrates a gateway using a remote SNACRM through the "-r" argument as well as making use of a JAM 4.1.1 -noexit feature that prevents the WebLogic Server from exiting when the gateway ends.
For WebLogic Server 5.1, the corresponding weblogic.properties entry is as follows:
Listing 3-3 weblogic.properties Entry for Specifying the Startup Class for WebLogic Server 5.1
weblogic.system.startupClass.jcrmgw=com.bea.sna.jcrmgw.gwboot
weblogic.system.startupArgs.jcrmgw=-r -noexit
The essential elements remain the same for WebLogic Server 5.1 and WebLogic Server 6.0, although the actual syntax for WebLogic Server 6.0 is now XML.
The XML code as illustrated in Listing 3-2 can be manually added to the config.xml file located in BEA/HOME/config/yourdomain, or it can be added through the WebLogic Server 6.0 Administration Console as shown in Figure 3-1.
Figure 3-1 WebLogic Server 6.0 Administration Console
You can click the jcrmgw link to display detail about the class as shown in Figure 3-2.
Figure 3-2 Details of the jcrmgw Startup Class
Notice that the -noexit argument is used and the Abort startup on failure option is not selected.
Post Configuration Requirements
Start WebLogic Server and verify that the SnacTask Startup Complete message indicates the gateway is ready. You can also confirm that the CICS connection is acquired by using the CICS CEMT I CON (*) command to verify that your connection is in the ACQuired state, indicating the link is ready for use.
JAM Administration Servlet
The JAM Administration Servlet allows you to stop or start the JAM gateway through a graphical interface that displays in your Web browser. Following is an example of the JAM Administration Servlet window:
Figure 3-3 JAM Administration Servlet Window
Before you start the JCRMGW gateway, you must configure the servlet by adding an entry to the weblogic.properties file if you are using WebLogic Server 5.1 or the web.xml file if you are using WebLogic Server 6.0.. Then you can display the JAM Administration Servlet window in your browser; if required, select several options for starting JAM; and click a command button to start or stop JAM.
Configuring the Servlet for WebLogic Server 5.1
To configure the JAM Administration Servlet, add the following entry to the weblogic.properties file:
weblogic.httpd.register.jamAdmin=com.bea.sna.jcrmgw.JamAdmin
Note: This entry is case sensitive. If you are planning to start and stop the gateway without restarting WebLogic Server, you should consider specifying the -noexit option in the weblogic.system.startupArgs.jcrmgw property.
For example, use the following command:
weblogic.system.startupArgs.jcrmgw=-r -noexit
Configuring the Servlet for WebLogic Server 6.0
To configure the JAM Adminstration Servlet, modify the web.xml file located in the config/mydomain/application/DefaultWebApp_myserver/WEB-INF/ directory of your WebLogic Server installation. After modification, your web.xml file should look similar to the example shown in Listing 3-4. The lines marked in bold should be added to your existing file. Your file might also contain other entries not related to JAM.
Listing 3-4 Sample web.xml File
<?xml version="1.0" ?>
<!DOCTYPE web-app (View Source for full doctype...)>
<web-app>
<servlet>
<servlet-name>JamAdmin</servlet-name>
<servlet-class>com.bea.sna.jcrmgw.JamAdmin</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JamAdmin</servlet-name>
<url-pattern>JamAdmin</url-pattern>
</servlet-mapping>
</web-app>
Starting the Servlet
To bring the JAM Administration Servlet up in a browser window, enter the following URL:
http://<host>:<port>/jamAdmin
In this example, <host> and <port> specify the WebLogic listen address.
Setting Servlet Options
You may set several boot options to be used when the JCRMGW gateway is started from the JAM Administration Servlet window. These options correspond to options used with the GWBOOT command. For more detailed information about the GWBOOT options, refer to the "Configuration Checker Utility" section in the BEA WebLogic Java Adapter for Mainframe User Guide.
The following options may be set in the JAM Administration Servlet window before you start the JCRMGW gateway:
|
Option |
Corresponding GWBOOT Option |
Description |
|---|---|---|
|
Trace on |
-t |
Turns on level 3 CRM tracing |
|
Remote CRM |
-r |
Specifies a remote CRM |
|
Default user |
-u <name> |
Specifies a user ID |
Note that when the servlet is started, the options selected, Trace on, Remote CRM, and Default user, reflect what is contained in the weblogic.system.startupArgs.jcrmgw property in the weblogic.properties file.
Using Servlet Commands
The following command buttons on the JAM Administration Servlet window allow you to start or stop JAM:
|
Command Button |
Description |
|---|---|
|
Start |
Initializes the gateway with the specified options. The message 'JAM has been successfully started' appears if the operation succeeds. |
|
Stop |
Stops the gateway if it is currently running. The message 'JAM has been successfully stopped' appears if the operation succeeds. |
|
|
|
|
|
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|