NonStop JMS C++ API Programmer's Guide

Installation and Configuration for TNS/E
NonStop Server for Java Message Service C++ API Programmer’s Guide526459-002
3-10
NSJMS Properties File
SimpleReceiver.cpp. This sample program receives simple messages
from a queue.
SimplePublisher.cpp. This sample program publishes simple messages to
a topic.
SimpleConsumer.cpp. This sample program subscribes and consumes
messages from a topic.
NSJMS Properties File
The NSJMS C++ API uses the NSJMS properties file to store and retrieve application
properties. The NSJMS properties file name is nsjms.properties and is located in
the home directory of your NSJMS (T1251) installation, which is typically
/<jms-install-dir>/nsjms/T1251-version.
The NSJMS C++ API only makes use of a subset of the properties found in the
nsjms.properties file. The properties that the NSJMS C++ API use are:
Logger.type
Logger.filename
Logger.loglevel
Database.volsubvol
Database.tabletimeout
Deadmsg.deletecount
For detailed descriptions of these properties, see the NonStop Server for Java
Message Service User’s Manual.
The NSJMS properties file is identified as an argument to the Session constructor.
Clients can pass the file name of the NSJMS properties file in the home directory of
your NSJMS (T1251) installation, or they can use the name of a different NSJMS
properties file. For example:
In a production environment, NSJMS C++ API clients should use the NSJMS
properties file in the home directory of your NSJMS (T1251) installation.
In a test environment, or while troubleshooting a problem, NSJMS C++ API clients
might want to use a different properties file in order to write, trace or debug
statements to a different log file or have them display on the console, or send and
receive messages from a different database. In such cases, the NSJMS property
file should be copied from the NSJMS installed directory to the NSJMS C++ API
test environment. After altering the properties, change the argument in the Session
constructor to point to the alternate nsjms.properties file in the NSJMS C++
API test environment, using a fully qualified filename or an environment variable,
as shown in the sample programs.
For additional information about using the NSJMS properties file as an argument to the
Session constructor, see Creating a Session on page 5-3.