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 IndexMultiphase Commit2- phase commit possible?

Post new topicReply to topic Goto page 1, 2, 3  Next
2- phase commit possible? View previous topic :: View next topic
Author Message
mqrules
PostPosted: Mon Nov 12, 2007 2:15 pm Post subject: 2- phase commit possible? Reply with quote

Voyager

Joined: 01 Jun 2005
Posts: 95
Location: US

"MQ Server" (not MQClinet) is installed on the server1 and qmgr QM1 is on the server2. Database is on server1.

If the MQ app/Weblogic is running on server1 connects to the QM1 qmgr on server2 via Client-connection, can the twoo-phase commit be possible? I think so as both of the servers have "MQ server", but would like to confirm with the forum.

Thanks for your help.
MR
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 12, 2007 2:19 pm Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

No.

You can only get 2PC with a bindings connection or an Extended Transactional Client Connection.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Nov 12, 2007 2:21 pm Post subject: Re: 2- phase commit possible? Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

mqrules wrote:
If the MQ app/Weblogic is running on server1 connects to the QM1 qmgr on server2 via Client-connection, can the twoo-phase commit be possible?

Only if you use the Transactional MQ Client, which I believe costs the same as an MQ Server.

The fact that there's an MQ Server running on the platform where your client is running (server1) is irrelevant, as you're not connecting to it.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
mqrules
PostPosted: Tue Nov 13, 2007 11:35 am Post subject: Reply with quote

Voyager

Joined: 01 Jun 2005
Posts: 95
Location: US

Thank you guys!!!

MR
Back to top
View user's profile Send private message
TimothyV
PostPosted: Mon Dec 17, 2007 11:41 pm Post subject: Reply with quote

Novice

Joined: 17 Dec 2007
Posts: 17

jefflowrey wrote:
No.

You can only get 2PC with a bindings connection or an Extended Transactional Client Connection.


What is and how can i establish a bindings connection?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 18, 2007 1:41 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25917
Location: Texas, USA

TimothyV wrote:
jefflowrey wrote:
No.

You can only get 2PC with a bindings connection or an Extended Transactional Client Connection.


What is and how can i establish a bindings connection?


As a follow on from this:

http://www.mqseries.net/phpBB2/viewtopic.php?t=41091&highlight=

A bindings connection (sometimes called a server connection) is where the application runs on the same machine as the queue manager and "binds" to it via RPC rather than clients to it over TCP.

There are 3 types of connection in .NET IIRC - managed, client and server. You're using client, you need server. The .NET manual will be more authorative than me in this matter.

Remember - a server connected application has to run on the same machine as the queue manager. There are good reasons (architectually) why you might not want to do that..
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
TimothyV
PostPosted: Tue Dec 18, 2007 2:11 am Post subject: Reply with quote

Novice

Joined: 17 Dec 2007
Posts: 17

Vitor,

I tought i was using server:

Code:


                System.Collections.Hashtable properties = new System.Collections.Hashtable();
                properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_BINDINGS);


[/quote]
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 18, 2007 12:29 pm Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25917
Location: Texas, USA

That looks like bindings to me.

Your other thread refered to "a client connection" hence the confusion. I don't know how .NET reacts if you select bindings on a machine with no queue manager but that's the setting.

I'd double check the queue manager & the database configuration for 2-phase commit. Which of them is the co-ordinator; I have a faint memory of rules about the queue manager coordinating or being coordinated in various circumstances.

The manual will be your friend here.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
TimothyV
PostPosted: Tue Dec 18, 2007 11:17 pm Post subject: Reply with quote

Novice

Joined: 17 Dec 2007
Posts: 17

Quote:
I don't know how .NET reacts if you select bindings on a machine with no queue manager but that's the setting.


My machine has a queue manager. Like i said before, everything is installed on my local machine except the database. So my com+ component and everything from IBM Websphere is installed local.

I can make this work perfectly with different database actions, all in one transaction, it's only the communication with the queue that isn't enlisting. Something has to be configured to get this working?

I read about every manual i could see, but nowhere i can find some decent information or an example about how to use server bindings.

I've been pulling my hair out for the last 5 days....
Back to top
View user's profile Send private message
David.Partridge
PostPosted: Wed Dec 19, 2007 12:15 am Post subject: Reply with quote

Master

Joined: 28 Jun 2001
Posts: 249

Are you using an MQBEGIN (or equivalent) to tell the QM that you want to take part in two phase commit?
_________________
Cheers,
David C. Partridge
Back to top
View user's profile Send private message
TimothyV
PostPosted: Wed Dec 19, 2007 12:22 am Post subject: Reply with quote

Novice

Joined: 17 Dec 2007
Posts: 17

Hi David,

this is the code i'm using:

Code:
[Transaction(TransactionOption.Required)]
    public class CUSTOM_MQ : ServicedComponent
    {

        public CUSTOM_MQ()
        {
           
        }

        [AutoComplete]
        public void Put()
        {

            MQMessage mqMsg = null;
            MQQueue mqQueue = null;

            try
            {
                MQPutMessageOptions opt = new MQPutMessageOptions();
                opt.Options |= IBM.WMQ.MQC.MQPMO_SYNCPOINT;

                System.Collections.Hashtable properties = new System.Collections.Hashtable();
                properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_BINDINGS);

                MQQueueManager _mqQmgr = _mqQmgr = new MQQueueManager("qm_amqtsivt", properties);

                mqQueue = _mqQmgr.AccessQueue("TestQueueTimothy", MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT);
                mqMsg = new MQMessage();
                mqMsg.Format = IBM.WMQ.MQC.MQFMT_STRING;
                mqMsg.WriteString(DateTime.Now.ToString("HH:mm:ss"));
                mqQueue.Put(mqMsg, opt);

                mqQueue.Close();
            }
            finally
            {
                if (mqQueue != null && mqQueue.IsOpen)
                    mqQueue.Close();
            }


         
             
          //  throw new Exception("test");

        }
 
    }


i hope this gives you more information...
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 19, 2007 3:48 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25917
Location: Texas, USA

TimothyV wrote:
Something has to be configured to get this working?


Well the queue manager has to be configured to use the same XA transaction coordinator as the database, or be the coordinator for the database. Hence my comment 2 posts ago about checking the configuration and which piece of software is performing the role of coordinator......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
TimothyV
PostPosted: Wed Dec 19, 2007 4:35 am Post subject: Reply with quote

Novice

Joined: 17 Dec 2007
Posts: 17

MSDTC will be the coordinator. Where must this be configured?

The one screen i think that can be used to configure this is: XA Resource Manager settings.

Queue mngr - properties - resources.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 19, 2007 4:38 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25917
Location: Texas, USA

TimothyV wrote:
The one screen i think that can be used to configure this is: XA Resource Manager settings.


Not a bad place to be configuring XA settings I do agree.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
TimothyV
PostPosted: Wed Dec 19, 2007 4:47 am Post subject: Reply with quote

Novice

Joined: 17 Dec 2007
Posts: 17

lol, i did had a feeling this could be the right place.

Now how must this be configured for MSDTC ?
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum IndexMultiphase Commit2- phase commit possible?
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.