5 3 1 JSM via JSMDirect

Install LANSA on Linux

5.3.1 JSM via JSMDirect

This test matches the most common scenario, where you want to use the JSM via an HTTP connection. In this test, a web browser (for example, Netscape or Internet Explorer) is used to test the JSM setup. For the later tests listed in 5.3.5 Further Examples, you will also need to install the User Agent.

Before You Begin

Before you begin to test the JSM Server, check the following:

  • Have you installed the JSM Server and JSMDirect on Linux?
  • Have you installed the JSM Server licenses?
  • Do you know the IP address of the JSM Server on Linux?
  • Is there an HTTP server running on the Linux server, and is it using the generated jsm.conf?
  • Have you installed LANSA for Linux?
  • For the later examples, have you installed the User Agent on Windows, Linux (with at least Java 1.4)?

Step 1. Start JSM

Use the strjsm script to start a JSM instance.

If the JSM Server does not start, or stops after a few seconds, refer to Troubleshooting in the Installing LANSA on Windows Guide.

Step 2. Test JSMDirect

From a web browser, call the JSMDirect CGI program with no arguments. In most cases, this will be at http://linuxhost/cgi-bin/jsmdirect where linuxhost is the host name or IP address of your Linux server.

You should see a message like this:

Step 3. Review Example Code

For a function to test JSMDirect, refer to the JSMDirect Example in the LANSA Integrator Guide. To deploy this function on the Linux server, refer to the Deploying LANSA Applications on Linux Guide for details.

Make sure that you use the IP address or host name of the Linux JSM Server in your JSM_OPEN command. For example:

USE BUILTIN(JSM_OPEN) WITH_ARGS('LINUXHOST:4560') TO_GET(#JSMSTS #JSMMSG)

 

Step 4. Register Function with JSMDirect

Add the following line to the text file ${INTEGRATOR_ROOT}/integrator/jsmdirect/dc_w29.txt :

TEST,*DEFAULT,JSMTEST,EXAMPL8,DEM,ENG

 

The example assumes that EXAMPL8 is the name of the example function in the JSMTEST process of the DEM partition.

Once this line has been added, test the function by opening http://linuxhost/cgi-bin/jsmdirect?test in your browser.