NonStop JMS User's Manual (H06.03+, J06.03+, NonStop JMS 3.0+)

NSJMS Installation and Configuration for TNS/R
NonStop Server for Java Message Service User’s Manual522356-006
2-10
Install and Configure NSJMS
editor of your choice, update the java.naming.provider.url property in
the jndi.properties file with the path for the new directory.
The jndi.properties file is described on page 2-15 and contains values
that are necessary to use a simple JNDI file service provider on the operating
system.
The nsjms.properties file and the jndi.properties file contain default key
and value combinations and require few or no changes.
11. Add the JNDI and create a sample queue and topic by using these commands:
12. Compile the sample programs by using these commands. The sample programs
use the JNDI object store and destinations created in Step 11 on page 2-10:
13. 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.
Note. nsjms.properties and jndi.properties are loaded from directories in the
CLASSPATH. You can copy the property files to other directories and edit them for
different users or applications. However, you then must update CLASSPATH to include the
directories containing the edited files.
OSH: cd /usr/tandem/nsjms/version
OSH: java com.tandem.nsjms.admin.JmsAdmin
NSJMS Admin started.
nsjms-> add jndi
Jndi Initialized
nsjms-> add queue Q1
Destination added.
nsjms-> add topic T1
Destination added.
nsjms-> exit
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 5
on page 2-8 and Step 6 on page 2-8.
OSH: java -Dsqlmx_nowait=on SimpleReceiver -queue Q1 -ackmode 1