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 » WebSphere Message Broker (ACE) Support » memory leak in MQSI plugin examples ?!

Post new topic  Reply to topic
 memory leak in MQSI plugin examples ?! « View previous topic :: View next topic » 
Author Message
mpuetz
PostPosted: Sat Mar 16, 2002 2:22 pm    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

after some interesting deployment nightmares (brokers
crashing randomly leaving execution groups in an inconsistent
state, even after restarting the broker) with my
custom plugin nodes I eventually found out, that the
context and all attributes must be freed manually in the
deleteNodeContext() function. I found this out only after
analyzing some of the sources of other plugins which do
this explicitly. What was totally confusing to me was
the following fact: The programming guide states you should
use the deleteContextNode() function to free plugin resources
created in the createNodeContext() function, hence I assumed
I should free the context myself. However looking at the
samples provided with MQSI (BipSampPluginNode.c) the default
context (which is provided by the plugin node wizard) is *not*
freed nor any mamory for the node attributes.
Also the wizard generated template doesn't free the context.
Therefore I was completely mislead into the assumption that freeing
the context and its attributes was taken
care of in the framework and only freeing additional resources
allocated in createNodeContext() was my responsibilty.

Apparently, the developer creating the BisSampPluginNode fell into
the same pit as I did, trusting the wizard to generate well formed
code which does nothing, but works *reliably*.
Thus, any MQSI developer monitoring this: Please, get the examples
and the wizard templates fixed ! Examples with mistakes like this
are not helpful, but are very confusing and cost a lot of time
(and money) to find out ! Especially since these mistakes don't show
up in the way that one anticipates.
Mow, after this little rant, I actually have a real question about the
plugin interface.

I can use detachElement() to remove a subtree from a message, but
there is actually no deleteElement() call in the interface. So, what
happens if I don't attach the element again at some other place ?
When will the memory of detached elements be freed (will it be freed
at all) ?


_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
warrenpage
PostPosted: Mon Mar 18, 2002 5:45 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Feb 2002
Posts: 56
Location: Australia

Thanks for the info..

We had the same question about deleting elements. I assumed it did not free the space.

In the absence of a DeleteElement call we were planning on using the cnicopyelementtree call.

Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
CT
PostPosted: Sat Apr 06, 2002 11:22 pm    Post subject: Reply with quote

Newbie

Joined: 05 Apr 2002
Posts: 3

What wizard you are refering to?
please tell me, How can i get it?
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Apr 07, 2002 8:28 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

If you are using MQSI 2.0.2 or higher, you can generate sample plug-in code using SmartGuide in the control center. Mathias is talking about the same wizard here.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » memory leak in MQSI plugin examples ?!
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.