beautypg.com

Building the java archive (jar) file, Executing the standalone server and client, Executing the ts/mp server and client – HP Integrity NonStop H-Series User Manual

Page 57

background image

Environment variable JAVA_HOME must be set to NSJ installation directory

Modify the jndi.properties file to point the URL to a valid NSMQ broker. The key to
modify is java.naming.provider.url.

Building the Java Archive (JAR) file

To generate the JAR file:
1.

Edit the /samples/pway-samples/build.xml file.
Change the jtoolkit.dir property to point to a valid JToolkit/lib directory.

2.

Run the following command:

$ANT_HOME/bin/ant jar

This command builds the necessary jar file required to run the samples.

Executing the standalone server and client

To execute the standalone server and client:
1.

Run the following command:

run -name=/G/SRVR $JAVA_HOME/bin/java -cp
./:./nsmq-pway.jar:../../activemq-all-5.6.0.jar:/usr/tandem/javaexth11/lib/tdmext.jar
-Djava.library.path=/usr/tandem/javaexth11/lib
com.hp.nsmq.sample.NonStopServer

This command starts a standalone server

2.

Run the following command from another OSH shell to send requests to this server:

$ANT_HOME/bin/ant ipcClient -Darg1=SRVR -Darg2="Hello NSMQ"

An output similar to the following is displayed:

[Begin-output of Command]
Buildfile: build.xml

ipcClient:
[java] Java Version is : 1.7.0_01
[java] Loading PUT DLL..
[java] Reply from Server: SENT <-- This is the JMS message sent to NSMQ.
[java] Reply from Server: RECEIVED:Hello NSMQ <-- This is the JMS message
received from NSMQ.

BUILD SUCCESSFUL
Total time: 2 seconds
[End-Output of Command]

Executing the TS/MP server and client

To execute the TS/MP server and client:
1.

Create a PATHMON process to host the server class.

2.

Change to an empty volume in TACL shell, for example, $SAS1.MYPMN.

3.

From this subvolume, run the following command:

run $SYSTEM.SYSTEM.PATHMON /name $MYPMN, cpu 2, nowait/3

where, the primary CPU is 2 and the backup CPU is 3.

4.

Open a PATHCOM session to this PATHMON process using the following command:

PATHCOM $MYPMN

5.

Copy and paste the contents of the PATHMON-SETUP file into this session.
This sets up the PATHMON process started in step 3.

Using JMS from Pathway Server Classes

57

This manual is related to the following products: