ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Transactional support for MQ Client apps.

Post new topic  Reply to topic
 Transactional support for MQ Client apps. « View previous topic :: View next topic » 
Author Message
watt01
PostPosted: Tue Aug 06, 2002 5:26 am    Post subject: Transactional support for MQ Client apps. Reply with quote

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
View user's profile Send private message
watt01
PostPosted: Tue Aug 06, 2002 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Wed Aug 07, 2002 1:26 am    Post subject: Reply with quote

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
View user's profile Send private message
poki
PostPosted: Wed Aug 07, 2002 10:22 am    Post subject: XA support Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Transactional support for MQ Client apps.
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.