|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Transactional support for MQ Client apps. |
« View previous topic :: View next topic » |
Author |
Message
|
watt01 |
Posted: Tue Aug 06, 2002 5:26 am Post subject: Transactional support for MQ Client apps. |
|
|
Newbie
Joined: 03 Jun 2002 Posts: 6
|
Hello everyone,
I have a question on transactional support from MQ client apps.
I have a MQ Client application running on Solaris which connects to MQServer on AS/400. The client app also connects to Sybase.
I want to implement the following logic in the above setup:
1. Begin trans (MQ and Sybase)
2. Get the next message from MQ.
3. Parse the message and apply changes to Sybase.
4. If Sybase call failed, rollback MQ to retain the MQ message in the queue.
Otherwise, Commit MQ and Sybase.
In other words, if Sybase goes down, I need to put the message back to the queue by rolling back MQ. As per the MQ API docs, transactional support is not available for MQ Client apps. Is there any way to implement this (other than simply pushing the message back to the queue?)
Thanks in advance! |
|
Back to top |
|
 |
watt01 |
Posted: Tue Aug 06, 2002 12:28 pm Post subject: |
|
|
Newbie
Joined: 03 Jun 2002 Posts: 6
|
I went through the documentation and here is what I found out:
1. Using MQGET /PUT, use MQGMO_SYNCPOINT option. This is implicit BEGIN TRANS for MQ.
2. If for some reason, you need to back out, simply use MQBACK, which would simply back out the unit of work from GET/PUT call in step 1. |
|
Back to top |
|
 |
zpat |
Posted: Wed Aug 07, 2002 1:26 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If you are doing separate commits to Sybase and MQSeries, there will be small windows of exposure when one system could commit and the other fail to do so.
To ensure transactional integrity (like if you are handling money transfers) you must use a single transaction coordinator. This would normally be the MQSeries server acting as a XA resource coordinator for both MQSeries and Sybase.
In this case, I think you have to run the application on the MQServer. |
|
Back to top |
|
 |
poki |
Posted: Wed Aug 07, 2002 10:22 am Post subject: XA support |
|
|
 Newbie
Joined: 05 Aug 2002 Posts: 9 Location: US
|
You need to perform the following tasks:
Check environment variable settings.
Create symbolic lines for Sybase libraries (Sun Solaris only).
Enable Sybase XA support.
Create the Sybase switch load file.
Add an XAResourceManager stanza to the qm.ini file, or to the Windows NT Registry.
Within the Sybase XA configuration file, you need to define a Logical Resource Manager (LRM) for each connection you will make to the Sybase server that is being updated.
e.g.
# The first line must always be a comment
[xa]
LRM=lrmname
server=servername
xaserver=xaservername
The simplest method for creating the Sybase switch load file is to use the sample files installed under the mqmtop/samp/xatm directory.
#include <cmqc.h>
#include "xa.h"
extern struct xa_switch_t sybase_xa_switch;
struct xa_switch_t * MQENTRY MQStart(void)
{
return(&sybase_xa_switch);
}
For more info you can check Sybase configration manual with MQ |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|