Author |
Message
|
garethlist |
Posted: Thu Jun 17, 2010 7:19 am Post subject: Using the MQQueueManager.Begin method using vbScript |
|
|
Newbie
Joined: 17 Jun 2010 Posts: 4
|
Hi,
I am currently developing a secure payments solution with a limitation of using vbScript on a thrid party software application which is generating the various messages sent/received via MQ. I therefore need to use the ActiveX (MQAX200.dll) API to code this project. I have the MQ client installed on the third party software application server.
I need to use distributed transactions to wrap around various operations. The MQQueueManager object contains a number of methods that seem to support this (Begin, Commit, Backout etc). When I just ran a piece of test code to test this piece, I got an error 2012 'MQRC_ENVIRONMENT_ERROR'. Having done some initial investigation I found the following:
"This reason code is MQRC_ENVIRONMENT_ERROR, and it is thrown because distributed transactions are not supported with client transport".
Is there any way that I would be able to connect to the Queue manager in server mode via this approach? (this seems to be possible via the Java/C# API) It would seem strange that these methods are available and I'm not able to use them. Failing that, are there any other solutions that would be possible? If I had an MQ server installed on the third party server instead of a client would this resolve the issue? Obviously I want to avoid that given the costs involved.
Greatly appreciate any help in this area as it is a critical project.
Thanks |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jun 17, 2010 8:04 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
For client-based applications, distributed UofW's are supported with the Extended Transational Client, not the base client.
Server-bindings (not client) should work. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
garethlist |
Posted: Thu Jun 17, 2010 8:18 am Post subject: |
|
|
Newbie
Joined: 17 Jun 2010 Posts: 4
|
Thanks for your help.
I just installed the Client with Extended Transactional Client and re-ran my code but it still failed with the same error. Is there anything else I need to do? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 17, 2010 8:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I don't believe that ETC support is usable in the ActiveX APIs. These are very old APIS.
You should be able to use the .NET APIs (which don't necessarily support ETC either.... ) from VBScript on any modern VBScript capable application server...
You should look at the documentation on MQ transactions under Windows DTC as well. This is distinct from the MQ ETC transactionality - but I also don't believe it works with the very old ActiveX API that you shouldn't be using. |
|
Back to top |
|
 |
shashikanth_in |
Posted: Thu Jun 17, 2010 9:07 am Post subject: |
|
|
Centurion
Joined: 26 Feb 2009 Posts: 123
|
MQ .NET interface supports transactions via the Unmanaged mode only. There are couple of points one needs to do:
1) Strongly name the application
2) Make it COM visible.
HTH |
|
Back to top |
|
 |
garethlist |
Posted: Fri Jun 18, 2010 2:03 am Post subject: |
|
|
Newbie
Joined: 17 Jun 2010 Posts: 4
|
Thanks folks.
I wasn't aware that .Net supported VBScript. Does anyone have any idea how this would work, code examples etc? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jun 18, 2010 5:00 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Look in the MQ samples - <MQ Install>\tools\mts\samples
Edit: Hrm. Looking at that again, it seems to be all ActiveX and not .NET..
<MQ Install>\tools\dotnet\samples\vb has vb that uses the .net interface, which *should* be usable from VbScript? |
|
Back to top |
|
 |
|