NonStop JMS C++ API Programmer's Guide

Using the NSJMS C++ APIs
NonStop Server for Java Message Service C++ API Programmer’s Guide526459-002
5-15
Running User Written C++ Programs
To include the libnsjmsc.a archive file when building the user code, add the
following two options:
-lnsjmsc -L$(CAPI_HOME)/lib
The -lnsjmsc option searches for a library named libnsjmsc.a. The “lib” at the
beginning of the name, and the “.a” at the end are implied.
-lztlhsrl -lzrwslsrl -lzclisrl -lzcplsrl
These TNS/R shared run-time libraries (SRLs) are required.
For CAPI_HOME=/usr/tandem/nsjms/T2811-version, other required nld options
are:
-elf
-set systype oss
-obey /usr/lib/libc.obey
/usr/lib/crtlmain.o
-lztlhsrl -lzrwslsrl -lzclisrl -lzcplsrl
-lnsjmsc
-L$(CAPI_HOME)/lib
Running User Written C++ Programs
The steps required to run NSJMS C++ APIs client, are similar to those outlined for
running the example programs in Section 2, Installation and Configuration for TNS/R.
Add the queues and/or topics needed by the client to the database by using the
NSJMS administrative utility.
Have an NSJMS properties file in the location designated in the Session
constructor propertyFile argument. For example,
pSes = new Session("/dir/subdir/nsjms.properties");
In all the example programs, this location is NSJMS_HOME.
Run the client by issuing the run program_file_path [arguments]
command. For example,
run SimpleSender -queue q1 -count 5