Author |
Message
|
guenter1978 |
Posted: Tue Jan 25, 2005 4:18 am Post subject: Problems using Transactions with external database |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
Hello,
I am using WebSphere MQ 5.3 CSD8 Trial Version.
Client and Server are installed on the same host (win2000, servicepack 4).
I configured a queue manager named 'QM_gspc' listening on default port 1414.
I also installed a DB2 Database on the same host as WebSphere MQ. DB2 configured and installed a sample database named 'SAMPLE', with several tables in it. One for example is a table called 'DEPARTMENT' with the fields DEPTNO, DEPTNAME, MGRNO, ADMRDEPT and LOCATION.
It is not really important how the fields or tables are named, I write it for easilier describing my problem.
I have done the steps described in System Administration Guide.
I build the db2swit.dll and configured the queue manager QM_gspc in MQ Services.
I changed the user account used for MQServices to one which is not longer than eight characters.
I set in db2 the permissions to connect to this database using following command in db2commandlineprocessor:
Quote: |
connect to SAMPLE
grant connect on database to user mqm
|
After doing this I restarted the queue manager.
Every thing ok until I try to test if the configuration work. (I thought that I have configured MQ correct, but I am not really sure)
I have tried to call a MQBEGIN api call by using the api test program which is delivered by WebSphere MQ installation. No error occured.
Then I tried to insert rows in table DEPARTMENT in db2 database SAMPLE.
But the inserted rows are immediately visible and pressing the MQBACK button in the api test program doesn't have any impact to the database.
I wonder why?
Can anybody help me? |
|
Back to top |
|
 |
kirani |
Posted: Tue Jan 25, 2005 11:58 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Did you create a resource for your DB in MQSeries snap-in (Resource Tab)?
Also, take a look at Chapter 11 in Systems Admin Guide. You will find some sample programs in <wmq_home>\Tools\C\Samples\xatm directory. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
guenter1978 |
Posted: Wed Jan 26, 2005 12:51 am Post subject: |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
I have created a resource in MQSeries snap-in.
Have I missunderstund the idea of two-phase commit or have I missconfigured my system?
I thought I call an MQBEGIN api call, then do something with the db2 database, like an insert from from any other application. The problem is that the inserted row is immediatly visible to all and the MQBack seems not working correctly.
I've done the steps described in this guide, but nothing changed. |
|
Back to top |
|
 |
guenter1978 |
Posted: Wed Jan 26, 2005 6:24 am Post subject: |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
Another question for same topic.
Have I something to configure on database side, which is not written in System Admin Guide?
Is the db2swit.dll which can be build using MS Visual Studio only a sample dll and therefore the actions I wanna do not possible? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 26, 2005 6:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Maybe it is possible you can't do this using Trial Version. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
guenter1978 |
Posted: Wed Jan 26, 2005 6:35 am Post subject: |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
If so it is a little be unfair from IBM not announcing this fact.
Or have I read over this information? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 26, 2005 7:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't know one way or another. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 26, 2005 8:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you correctly binding / enrolling the XA resources together in the transaction?
How are you setting your transaction borders (actively or passively using defaults)?
What is the default setting for transaction borders in your system?
If you can answer those questions you will be much closer to enlightment.
 |
|
Back to top |
|
 |
guenter1978 |
Posted: Wed Jan 26, 2005 1:41 pm Post subject: |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
@fjb_saper:
Thank you for your reply, but sadly I don't understand your reply at all.
How must I bind / enroll the XA resources together in the transaction? What possibilities do I have to do this?
How can I set transactions borders and what are transaction borders?
How can I inspect the default settings for transaction borders in my system? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 26, 2005 1:54 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
commit and rollback will mark the end borders.
sometimes begin will mark the start border.
for the XA bindings look at the APIs. Some of them use the xa resource.
Now remember you defined one for the qmgr. I expect another one is defined for the DB. Your transaction coordinator MUST enroll both...
I am much more familiar with the JMS scenario. Easier to setup in my opinion, due to the outside transaction coordinator....
As to the other questions I must confess I know the question but not the answer to it. When you will know the answer you will be one step away from solving your problem.
Sorry  |
|
Back to top |
|
 |
guenter1978 |
Posted: Wed Jan 26, 2005 2:20 pm Post subject: |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
ok now it is clearer what you wanted to know.
I marked the ends of the translation by begin and commit or in other case by begin and rollback.
For this marks I used the api test program, this is delivered by installation of WebSphere MQ.
I hope the api test program uses the correct api, I do not have any influence about this.
On the queue manager (I only have one in my system) did or should do the begin and commit or rollback borders. In fact it functions, but sadly only for the local queue, not on the external database.
The whole application which should use WebSphere MQ is written in delphi, there is no suitable joice to change to a java solution at the moment.
What do you mean with outside transaction coordinator? I thought the queue manager of WebSphere MQ act as transaction coordinator? |
|
Back to top |
|
 |
kirani |
Posted: Wed Jan 26, 2005 11:58 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
It'd be better to test if the sample program is working correctly with your setup. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
guenter1978 |
Posted: Thu Jan 27, 2005 1:47 am Post subject: |
|
|
Novice
Joined: 21 Jan 2005 Posts: 12 Location: Austria
|
Sadly I don't find useful documentation for the non executable example belonging to two-phase transactions.
There is either a useable documentation about the needed database structure or something else, which can help. |
|
Back to top |
|
 |
|