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 API Support » MQDISC

Post new topic  Reply to topic
 MQDISC « View previous topic :: View next topic » 
Author Message
kingsley
PostPosted: Thu Sep 02, 2004 10:02 am    Post subject: MQDISC Reply with quote

Disciple

Joined: 30 Sep 2001
Posts: 175
Location: Hursley

Hi,

I am using return statements in my C program. When i exit the C program using the return statements, will MQDISC get's called automatically.

My understanding that ipprocs of all the open queues will be increased by one.

Observation reveals that MQDISC is called automatically. Is that true.
Back to top
View user's profile Send private message Visit poster's website
tillywern
PostPosted: Thu Sep 02, 2004 10:27 am    Post subject: Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

Depending on your OS the MQCONN and MQDISC can be optional. MQ tracks connections through ipcs elements and when a program connected to the queue manager terminates MQ may clean up open handles.

EVEN IF YOUR OS ALLOWS, OR APPEARS TO ALLOW, YOU TO NOT ISSUE mqdisc/mqconn YOU SHOULD ALWAYS CALL THEM!!! If for no other reason than to avoid confusing programmers inherriting you code.

Overhead is minimal and avoiding them could cause strange issues that are difficult to debug.

MQ keeps track of open handles and uncommitted units of work and has a finite, although configurable, number them.

Unless the application developed is really suffereing from performance problems and is doing A LOT of connecting and disconnecting from MQ it does not make much sense to not have them in there.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
bower5932
PostPosted: Thu Sep 02, 2004 11:32 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You should definitely call MQDISC when you end. You should also be careful when using units of work that you don't explicitly commit or rollback when calling MQDISC. Depending on the platform, you get different results on whether the UOW is committed or rolled back for you by the MQDISC.

The bottom line is to do it yourself and leave nothing to chance.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
JasonE
PostPosted: Thu Sep 02, 2004 1:45 pm    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

I've lost count of the number of problems I have seen people raise which are caused by people writing (usually client) apps which dont MQDISC...

Trust me... just do it - safer for all involved!
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 API Support » MQDISC
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.