Author |
Message
|
MQuser_new |
Posted: Tue Aug 01, 2006 5:31 am Post subject: XA Switch File |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Aug 01, 2006 5:38 am Post subject: |
|
|
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 |
|
 |
MQuser_new |
Posted: Tue Aug 01, 2006 5:47 am Post subject: |
|
|
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 |
|
 |
mvic |
Posted: Tue Aug 01, 2006 6:06 am Post subject: Re: XA Switch File |
|
|
 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 |
|
 |
jefflowrey |
Posted: Tue Aug 01, 2006 6:08 am Post subject: |
|
|
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 |
|
 |
|