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 » SHARED ROW or Environment variable?

Post new topic  Reply to topic
 SHARED ROW or Environment variable? « View previous topic :: View next topic » 
Author Message
Bartez75
PostPosted: Wed Apr 15, 2009 3:04 am    Post subject: SHARED ROW or Environment variable? Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

Hi,
I want to store xmls somewhere to use it later in the flow. What is better from performance and memory consumption point of view?
SHARED ROW variable or Environment variable?

Broker 6.0
Back to top
View user's profile Send private message
vandi
PostPosted: Wed Apr 15, 2009 7:32 am    Post subject: Re: SHARED ROW or Environment variable? Reply with quote

Acolyte

Joined: 13 Dec 2008
Posts: 67

Bartez75 wrote:
Hi,
I want to store xmls somewhere to use it later in the flow. What is better from performance and memory consumption point of view?
SHARED ROW variable or Environment variable?

Broker 6.0


Environment Variables can be used to hold the value throughout the flow for a single message.
When we come to SHARED Variables , they have a long lifetime and are visible to multiple messages passing through a flow.

According to me, If you want to store the value only for a single message you can proceed with Environment variable.

Thanks
Back to top
View user's profile Send private message
Bartez75
PostPosted: Wed Apr 15, 2009 8:42 am    Post subject: Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

I'm trying ROW without SHARED, declared in the module. It works in debug but without debug it gives error with mini dump.

Error from Event Viewer:
A summary of the Error follows:
An Unhandled Exception detected in process 2436, on thread 0x7F4.
Type: EXCEPTION_ACCESS_VIOLATION (C0000005).
Address: 001B:7C342EEE.
The thread could not read from memory address 0x129A018C.
'.

A broker process is terminating abnormally.


In the ROW variable I store several xml messages taken from queue by MQGET node. Then in a loop I create OutputRoot with values from that ROW variable.

Then, I'm calling propagate in the loop after I create correct OutputRoot.

I'm calling CopyMessageHeaders() in the right place.


If I replace ROW variable with Environment.Variables then it works but I would like not to use Environment.Variables to store this xml messages because of memory usage.
The design is that I can't delete Environment.Variables before propagate so it will go with message to next nodes.

I can delete it later but I thought that ROW will solve it.


So, I just need to store let say 10 xml msg somewhere (in some variable) and then us it to create several OutputRoot.
What are my options here? To be honest I never had to use ROW before so I don't have experience with it.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Wed Apr 15, 2009 9:11 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Bartez75 wrote:


Error from Event Viewer:
A summary of the Error follows:
An Unhandled Exception detected in process 2436, on thread 0x7F4.
Type: EXCEPTION_ACCESS_VIOLATION (C0000005).
Address: 001B:7C342EEE.
The thread could not read from memory address 0x129A018C.
'.

A broker process is terminating abnormally.



I'd raise a PMR for that.


Quote:

If I replace ROW variable with Environment.Variables then it works but I would like not to use Environment.Variables to store this xml messages because of memory usage.


Whats the difference in terms of memory usage?

Quote:

The design is that I can't delete Environment.Variables before propagate so it will go with message to next nodes.


Why not? Why dont you just delete the variable you no longer need once its not needed?

I'm not sure I understand the constraints if you could explain I may be able to help more.
Back to top
View user's profile Send private message
Bartez75
PostPosted: Thu Apr 16, 2009 1:59 am    Post subject: Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

Hi,
This error I have on my local machine. When I run it on company server it works so I must have something on my pc or maybe lack of memory or perhaps no valid fixes installed.

Anyway, it is working with ROW but I have some basic question, I think.
Let say I have (pseudo code):

Code:

DECLARE XmlMsgTable ROW;
i=1
loop
SET XmlMsgTable.Xml[i] = Environment.Variables.MsgFromMQGet.XML; -- I got this message in the same loop (there is a propagate to MQGET node and this Environment.Variable.MsgFromMQGet is set there with the xml message which is on the queue)
i++;
end of loop

Then I use XmlMsgTable.Xml to build OutputRoot.

Do I have to delete this ROW variable at the end of compute node module to free memory, like:
SET XmlMsgTable.Xml = null;
or
SET XmlMsgTable = null;

or this is done by the broker itself?
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Apr 16, 2009 2:30 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

From looking at your code above, I don't see why you need to use a ROW at all, can't you just build up your message in OutputRoot directly?

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Bartez75
PostPosted: Thu Apr 16, 2009 2:52 am    Post subject: Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

It is just a part of the code.
The design is that I get one message (Msg1) on queue1. That xml message has elements MsgId with values of MQ MessageId of messages from queue2 (Msg2). So Msg1 has MQ MessageId of all related messages that are on queue2. Msg1 has also some other information, not just MsgId.

And in the loop I'm first gettting all messages (Msg2) from queue2 by propagating message with MQMD.MsgId = Msg1.MsgId to MQGET.
And I store these messages from queue2 in ROW.

And when I have them all in ROW I can create OutputRoot.

I'm stroing this in ROW or Environment because I have to create several OutputRoot based on messages from queue2 and when MQGET node do get messages are deleted from queue.

Can I browse messages with MQGET node (broker 6.0)?

Anyway I'm wondering if assigning null to that ROW variable makes any sense if it is at the end of module. I think that broker will destroy that variable, am I right?
Back to top
View user's profile Send private message
Bartez75
PostPosted: Thu Apr 30, 2009 7:02 am    Post subject: Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

Hi
Again me just before the long weekend.
I think I have a simple question but I don't know the answer.

Let say that there is variable Environment.Variables.Test
This variable contains a tree (xml message)

After SET Environment.Variables.Test = NULL element Test is deleted but what is happening in memory? Is it released after this?

Thanks for any help with this and have a nice weekend.
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 » WebSphere Message Broker (ACE) Support » SHARED ROW or Environment variable?
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.