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 Java / JMS » XA Switch File

Post new topic  Reply to topic
 XA Switch File « View previous topic :: View next topic » 
Author Message
MQuser_new
PostPosted: Tue Aug 01, 2006 5:31 am    Post subject: XA Switch File Reply with quote

Newbie

Joined: 01 Aug 2006
Posts: 4

Hi,
I am new to MQ.Can some one tell me what is a switch load file ?
What does it contain , ( I know it is a shared library if unix OS and a dll file if it happens to be a win machine ) ,

I know that these switch files are given by vendors(Oracle , db2=IBM,...)

I am interested in know why this switch file is needed and what does it do ?

It would be a great help is some one can tell how MQ transact with any DB is few lines .

Thanks
Newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 01, 2006 5:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's the file that describes the interface to the XA libraries in the database runtime.

If you know Java, think of it as the native part of a JNI call implementation.

MQ acts as a Transaction Manager in a Two-Phase Commit scenario. Otherwise it acts as a Resource Manager for an external transaction coordinator.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
MQuser_new
PostPosted: Tue Aug 01, 2006 5:47 am    Post subject: Reply with quote

Newbie

Joined: 01 Aug 2006
Posts: 4

Thanks for that quick reply jeffl

So can I say that switch file contains declaration ( though shared libraries does not do that ) and the implementaion is done is database's libraries,
can u explain a bit more taking the example of function xa_open ( who declares the function prototype who defines or implements it ? )

and any thoughts what is a switch table

Thanks
Back to top
View user's profile Send private message
mvic
PostPosted: Tue Aug 01, 2006 6:06 am    Post subject: Re: XA Switch File Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

MQuser_new wrote:
I am interested in know why this switch file is needed and what does it do ?

It would be a great help is some one can tell how MQ transact with any DB is few lines.

Help us to help you: what do you want to achieve?

A "switch load file" is a shared libary or DLL that contains a "switch". This is XA terminology - read the XA specification for more details on this. It's at http://www.opengroup.org/

It's called a switch load file because you load it in order to load the XA switch. A transaction manager needs to read flags, and call function pointers found in the switch.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 01, 2006 6:08 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The switch file defines the bindings. The shared library/dll contains the implementation.

If you look at the samples that are included, there's a xa.h and db2swit.c and db2swit.def.

The switch table is the mapping, essentially.
_________________
I am *not* the model of the modern major general.
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 Java / JMS » XA Switch File
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.