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 » User Exits » For newbie MQ Exit developers

Post new topic  Reply to topic Goto page Previous  1, 2
 For newbie MQ Exit developers « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Mon May 19, 2008 4:08 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

I moved this thread to the User Exits Forum.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue May 27, 2008 3:16 pm    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Roger & coleagues :
I have this user exit (TESTEXIT.dll) running in mq 6.0.1.1
The same DLL, under 6.0.2.3, produces a FDC file.

Any ideas ?

The original description is here :

>>> http://www.mqseries.net/phpBB2/viewtopic.php?t=43623

Sebastian.
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue May 27, 2008 4:34 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Try it at 6.0.2.1.

There is a fix for a security issue in 6.0.2.2. Exits may need to be updated to deal with this fix.

Open a PMR...

Use the contacts you developed while at "WSTC" to discuss this with people who might actually know the source code that is throwing the error...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue May 27, 2008 11:57 pm    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

(*) try 6.0.2.1 - is it MUCH better than 6.0.1.1 ?
Don't want to spend time installing a fix, and find it doesn't fix my problem.

(*) PMR - yes, I shall do that when I get some spare time.

(*) WSTC people - yes, this is the best way, of course.

Cheers.
Back to top
View user's profile Send private message Visit poster's website
HenriqueS
PostPosted: Tue Aug 12, 2008 9:09 am    Post subject: Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

Visiting this topic...

I´ve got several amqrmppa threads. It just grows a lot and my suspection it has to do with my channel exit calls.

It is NOT a 1 to 1 ratio (one exit invokation - one amqrmppa thread) but the number keeps growing a lot to the point he server is unstable.

I am doing the MQOPEN()s and MQCLOSE()s accordingly, checking the server status I just notice those amqrmppa threads, but no resources are actually locked by them.

Should I issue an MQDISC at the end? Maybe in some exit invocation calls, the MQCONN call is not getting 'ALREADY CONNECTED' and it is creating a new connection (and therefore a thread) within the queue manager? What should I look for?

Note: there is an APAR # IY53668 - 'HIGH CPU IN MCA IF PERSISTENT EXIT THREAD', but it seems solved for MQ 6.0.2.1, and here we have MQ 6.0.2.2.

So, in short, how do I force my exit to 'exit'?
_________________
HenriqueS
Certified Websphere MQ 6.0 System Administrator


Last edited by HenriqueS on Tue Aug 12, 2008 9:55 am; edited 1 time in total
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Aug 12, 2008 9:29 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

from some book ...

"Writing and compiling channel-exit programs", Intercommunication, SC34-6059-02




User exits and channel-exit programs are able to make use of all MQI calls, except as noted in the sections that follow. To get the connection handle, an MQCONN must be issued, even though a warning, MQRC_ALREADY_CONNECTED, is returned because the channel itself is connected to the queue manager.

You are recommended to avoid issuing the following MQI calls in channel-exit programs:

* MQCMIT
* MQBACK
* MQBEGIN
* MQDISC

Channel-exit programs should not modify the Channel Data structure (MQCD).

,
Back to top
View user's profile Send private message Visit poster's website
HenriqueS
PostPosted: Tue Aug 12, 2008 9:59 am    Post subject: Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

I am with the same PDF open here on my monitor, and I am not using MQDISC as it states. My only 'shutdown'' code for my exit is this:

Code:

pExitParms->ExitResponse = MQXCC_OK;
pExitParms->ExitResponse2 = 0;
pExitParms->Feedback = 0;

_________________
HenriqueS
Certified Websphere MQ 6.0 System Administrator
Back to top
View user's profile Send private message
David.Partridge
PostPosted: Tue Aug 12, 2008 11:33 pm    Post subject: Reply with quote

Master

Joined: 28 Jun 2001
Posts: 249

You will have many amqrmppa threads - at least one per connected channel/MQ client, and possibly many amqrmppa processes if you have a lot of connections.

Check your code *most* carefully for memory leaks (memory allocated and not freed) and handle leaks (queues/files/whatever opened and not closed/released).

Extensive desk checking and peer review are your friends here.
_________________
Cheers,
David C. Partridge
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Sat Aug 16, 2008 2:22 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

Hi,
HenriqueS wrote:
So, in short, how do I force my exit to 'exit'?

Regardless if your code is allowing the channel to continue or if your code is closing the channel in then in your MQXR_TERM code section you must:
- Close anything that was opened.
- Free anything that was allocated.

Finally, if you connected to the queue manager then you MUST do something like the following:
Code:
if (mqconnRC != MQRC_ALREADY_CONNECTED)
   MQDISC(&hconn, &mqcc, &mqrc);


Regards
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Tue Aug 26, 2008 1:41 pm    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

mr Roger : what you say is literally right
but I see a great chance to induce to errors ...

When you get control in a User Exit, you get these parameters

void MQENTRY MQAExit (
PMQVOID mqcxpptr, /* Channel exit param block MQCXP in/out */
PMQVOID mqcdptr, /* Channel definition MQCD in/out */
PMQLONG inmsglngptr, /* Length of data in/out */
PMQLONG inbuflngptr, /* Length of agent buffer in */
PMQVOID inbufptr, /* Agent buffer MQXQH+data in/out */
PMQLONG outmsglngptr, /* Length of exit buffer in/out */
PMQPTR outbufptr ) /* Address of exit buffer in/out */
{

and if you work only with that,
you don't CONNECT() to any qmgr,
so you don't have to DISC() any qmgr ....

Guess to provide a bit of light ... only.
Seb.
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Wed Aug 27, 2008 8:04 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

sebastia wrote:
Guess to provide a bit of light ... only.

You should never guess when it comes to advanced level topics. Secondly, you did not read HenriqueS's first post correctly or not at all.

sebastia wrote:
mr Roger : what you say is literally right
but I see a great chance to induce to errors

...

and if you work only with that,
you don't CONNECT() to any qmgr,
so you don't have to DISC() any qmgr

HenriqueS's application was connecting, opening and putting a message to a queue. He wanted to know if his application should also disconnect after closing the queue. The answer is yes, if you connect then you must disconnect.

Finally, just because the code is in an exit does not mean the exit is given a connection handle via the calling parameters. If the exit needs to work with a queue then it needs to use the standard MQ API calls. Not all MQ exits need to operate on a queue or message hence, not all MQ exits require the use of the MQ API calls.


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Thu Aug 28, 2008 9:15 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

You are absolutely right.
100% pure truth.
Serious.
Seb. ()
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » User Exits » For newbie MQ Exit developers
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.