|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQDISC |
« View previous topic :: View next topic » |
Author |
Message
|
kingsley |
Posted: Thu Sep 02, 2004 10:02 am Post subject: MQDISC |
|
|
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 |
|
 |
tillywern |
Posted: Thu Sep 02, 2004 10:27 am Post subject: |
|
|
 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 |
|
 |
bower5932 |
Posted: Thu Sep 02, 2004 11:32 am Post subject: |
|
|
 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 |
|
 |
JasonE |
Posted: Thu Sep 02, 2004 1:45 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|