NonStop JMS User's Manual (H06.03+, J06.03+, NonStop JMS 3.0+)
NSJMS Installation and Configuration for TNS/E
NonStop Server for Java Message Service User’s Manual—522356-006
3-9
Install and Configure NSJMS
11. Compile the sample programs by using these commands. The sample programs
use the JNDI object store and destinations created in Step 10 on page 3-8:
12. Test the sample programs:
You will need two OSS shells to test each sample program.
In the sample programs, you can enable the non-blocking features of SQL/MX by
issuing the sqlmx_nowait system property from the command line using the -D
option:
java -Dsqlmx_nowait=on client-name client-attribute
where client-name is the name of the sample program and client-
attribute specifies the sample programs attributes. For example:
For additional information on using the sqlmx_nowait system property, see
Threading on page 4-15.
a. Test the Point-to-Point sample by using these commands:
In the first shell:
In the second shell:
Your Point-to-Point sample output will be similar to:
OSH: cd examples
OSH: javac *.java
Note. Before testing each sample program, set the NSJMS_HOME variable and the
CLASSPATH variable in each shell; see Step 4
on page 3-6 and Step 5 on page 3-6.
OSH: java -Dsqlmx_nowait=on SimpleReceiver -queue Q1 -ackmode 1
OSH: cd examples
OSH: java SimpleReceiver -queue Q1 -ackmode 1
OSH: cd examples
OSH: java SimpleSender -queue Q1 -count 5
OSH: cd examples
OSH: java SimpleReceiver -queue Q1 -ackmode 1
OSH: RCV Message: Sending message 0
OSH: RCV Message: Sending message 1
OSH: RCV Message: Sending message 2
OSH: RCV Message: Sending message 3
OSH: RCV Message: Sending message 4