|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
lifetime of assembly in java plugin node |
« View previous topic :: View next topic » |
Author |
Message
|
rwa |
Posted: Thu Aug 14, 2003 10:25 pm Post subject: lifetime of assembly in java plugin node |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
Hi,
is the assembly in an java plugin node still alive if the flow was ended?
I want to use assembly in an other flow at a later time. Therfore a referenz to the assembly is stored by the java plugin node in another class in a static variable. This assembly is then used in another java plugin node in another flow.
Is this possible or do I have to copy the data from the assembly? |
|
Back to top |
|
 |
rwa |
Posted: Mon Aug 18, 2003 11:18 pm Post subject: |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
Hi myself,
now I can answer my question myself. The assembly is cleared after the flow leaves the jplugin node. But the message still exists. The message have to be cleared manually by calling MbMessage.clearMessage(). If this is not done the message does exists after the flow has ended.
If clearMessage is not called you can end up with a memory leak! |
|
Back to top |
|
 |
kirani |
Posted: Tue Aug 19, 2003 9:57 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I dont believe you need to call clerMessage() method always. Did you test this on your machine?
What will happen if you call this method within your plug-in and you have additional nodes connected to your plug-in node's output terminal? I believe an Exception will be thrown. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rwa |
Posted: Tue Aug 19, 2003 10:11 pm Post subject: |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
Hi Kiran,
you are right.
In my futher testing I found out, that clearMessage() should not be called for the message send with the assembly from the input Terminal. This message is handled by WMQI.
But clearMessage() has to be called for each message created by the jplugin node. If this message will be send to an output terminal clearMessage() has to be called after the assembly for that message was propagated.
An assambly created in an jplugin node does not need be to cleared. This is done by WMQI.
This different handling of the classes does not make the API easier to understand.
Rainer |
|
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
|
|
|
|