class safmq::MQConnection
A class for connecting to a SAFMQ message queue server
Child Classes
A class for connecting to a SAFMQ message queue server
Public Methods
msg
on the queue specified by qhandle
Member Documentation
Additionally destroying the connection rollsback and ends any pending
transactions. Thus if the following occurs:
MQConnection* con = new MQConnection("safmq://myserver","my name","my password"); MessageQueue* que = new MessageQueue(con,"my queue"); QueueMessage msg; con->BeginTransaction(); que->Retrieve(true,-1,msg); delete queue; delete con;
con->RollbackTransaction()
was
called, then close the queue and connection to the server.
msg
's
timestamp and message will have been set. It is important to note if the resposne
queue name is not set, any errors from the final destination queue/queue server will
be lost. It is suggested to use roundtripping unless error determination is not
required, otherwise errors generated by the final destination server such as:EC_DOESNOTEXIST |
EC_NOTAUTHORIZED |
EC_WRONGMESSAGETYPE |
EC_NOTOPEN |
EC_FORWARDNOTALLOWED |
EC_DUPLICATEMSGID |
msg
on the queue specified by qhandle
CommitTransaction()
or EndTransaction()
is not made before destrying the connection,
the transaction is rolled back to the state before calling BeginTransaction()
.
Enqueue(), Retrieve(), RetrieveID(),
or RetrieveCursor()
).
CreateTempQueue
the SAFMQ server has created a queue,
flagged as temporary, returns the server generated name of the queue, and a handle
to that queue. Closing the queue removes it from the system, there is no need to
explicitly delete it. Using the Closing technique, it is possible that the queue
may remain open, because other clients have access to the queue.
"safmq://localhost/" + tmpQueue
when supplying
the queue name to other clients.
Example: (the sample X509 certificate shipped with SAFMQ source)
Subject: C=US, ST=Nebraska, L=Omaha, O=SAFMQ, CN=Matthew Battey/emailAddress=mattbattey@users.sourceforge.net Issuer: C=US, ST=Nebraska, L=Omaha, O=SAFMQ, CN=Matthew Battey/emailAddress=mattbattey@users.sourceforge.netThawte's Issuer DN:
Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com
In this case the issuer and subject are the same value, because the certificate shipped with SAFMQ is a "self-signed" certificate. Typically the Subject DN will be set by you and the Issuer DN will be determined by the organization certifying the authenticity of the certificate's origin.
Note: The Java implentation produces distinguished name strings in reverse order in comparison to the default output from tools like OpenSSL. SAFMQ uses OpenSSL so these must be in the order that OpenSSL would report the value pair order.
Table of Contents HTML hierarchy of classes or Java