NonStop JMS C++ API Programmer's Guide
Using the NSJMS C++ APIs
NonStop Server for Java Message Service C++ API Programmer’s Guide—526459-002
5-2
Managing Transactions
If no explicit ID is specified, the ID is generated by adding one to the current highest
ID. Destination IDs cannot be changed once assigned. You must delete and re-create
a destination to change an ID.
Managing Transactions
Transactions and acknowledge mode are not part of the NSJMS C++ API, but
externally defined transactions are supported. They must be established using an
external API, such as HP NonStop Transaction Management Facility (TMF) or HP
NonStop Tuxedo, which will establish a TMF transaction for the process. Operations
that require an active TMF transaction are the Producer::send() and the
Consumer::receive(). If a transaction is aborted, messages sent under the
aborted transaction are affected as follows:
Messages sent under a transaction that aborts are not sent.
Messages received with a destructive consumer, for example, queue access, are
not deleted and are received again if the transaction under which they were
received is aborted.
Messages received from a durable subscription are received again if the
transaction under which they were received is aborted.
Messages received with non-destructive, non-durable access are received again if
the transaction under which they were received is aborted.
Developing NSJMS C++ APIs Client
Applications
NSJMS C++ APIs client applications hosted on the operating system use the NSJMS
C++ APIs to send and receive messages to and from other JMS clients or other
NSJMS C++ APIs clients.
Descriptions of common tasks performed by NSJMS C++ APIs clients, and information
about how the NSJMS C++ APIs implement the JMS interfaces when performing the
tasks are provided in:
Creating a Session on page 5-3
Populating a Message with Data
on page 5-3
Sending a Message
on page 5-5
Receiving a Message on page 5-9
Retrieving Data from a Message on page 5-11
Note. The code fragments in this section illustrate how specific tasks are implemented within
the NSJMS C++ APIs and are based on the sample programs in Section 6, NSJMS C++ API
Sample Client Applications.