SoftWoehr Class Library for IBM MQSeries** Class Reference

Revision 1.0.5

SoftWoehr Class Library for IBM MQSeries**  and this documentation are Copyright *C* 1999, 2000
Jack J. Woehr, P. O. Box 51, Golden, Colorado 80402-0051 USA
http://www.softwoehr.com

Table of Contents

#include 'ing and using the classes

Start your program with
#include jaxmq.hpp
This in turn includes the MQSeries include files, so those files must be findable by the C++ preprocessor.

Likewise, at link time, the MQSeries libraries must be findable by the linker.

All classes provided are in the namespace SoftWoehr. Your program should either declare that it is

using namespace SoftWoehr;
or should refer to the classes fully qualified, as in the declaration
SoftWoehr::MQQueue myQueue;

General behavior of member functions

Most member functions, excluding those intended to return specific types or objects, perform their work and return non-const reference to self. If an error occurs, an instance of an appropriate MQException derivative is thrown.

For example, queue operations don't return return codes. If all goes well, they return non-const reference to self. Otherwise, they throw an exception which contains the MQSeries completion code and reason code, along with a string value which describes the error. See MQException which characterizes the behavior of all exceptions thrown in the library.

Exceptions

Nested exception classes, e.g.,
MQQueueManager::NotConnected Exception
are pervasive in the library. All possess (at least) three public functions inherited from MQException.
  1. virtual const std::string & get_text(void)
  2. virtual MQLONG get_completion_code(void)
  3. virtual MQLONG get_reason(void)
You may derive from MQException in your code if you wish. Please examine the source files
mqexcept.hpp
mqexcept.cpp
for more information.

All SoftWoehr Class Library code should execute within a try block. If you are not sure what to catch, catch MQException and use const string & MQException::get_text() to determine what has been thrown.

Known shortcoming with exception strategy.

This code only uses exception specifications, e.g.,
Foo::bar(void) throws(woof);
sporadically. It should do so throughout. Read the headers. Our humble apology is that C++ doesn't enforce exception specifications in function declarations the way Java does.

Public classes and their public members

Here are the most important SoftWoehr classes for IBM MQSeries along with their most important public members. The list is not exhaustive, due to Please examine the header files for more detail.

Listed here are the most important entities you will be dealing with in your program, along with some guidelines for their usage. Also helpful are the examples provided.