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 CLEARING

Post new topic  Reply to topic
 SHARED ROW CLEARING « View previous topic :: View next topic » 
Author Message
matuwe
PostPosted: Fri Nov 16, 2012 12:52 am    Post subject: SHARED ROW CLEARING Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

HI I have followed the Routing sample and I am getting my data from database into a shared row variable. Next time I just read from shared row and not from Database.

My question is, if the data is changed on the databse I just refresh cache by setting my variable to null and reload from database, but the problem now is. My database table structure has changed. I keep on refreshing the cache but I do not get the new columns. The onlyway to resolve this was by renaming my variables and it worked.. But strange enough during debug I can still see the old variable name. Restarting the broker also didnt help. Is there any command I can run to clear all global variables..

I tried restarting reload and setting the variable to null.
Code:

SET CacheEvents = NULL;

also trid
SET CacheEvents .valid = TRUE;


Back to top
View user's profile Send private message
visasimbu
PostPosted: Fri Nov 16, 2012 1:06 am    Post subject: Reply with quote

Disciple

Joined: 06 Nov 2009
Posts: 171

Hi matuwe,

Row variable will hold more number of rows. So when you want to refresh introduce one more intemediate hirerachy like below.

CacheEvents.temp.valid

Here temp is intermediate hirerachy. Then try to set

SET CacheEvents.temp = NULL;

Try the above option.
Back to top
View user's profile Send private message Send e-mail
MBMQDeveloper
PostPosted: Fri Nov 16, 2012 1:07 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2012
Posts: 19

When you say that the database structure has changed, do you mean the column names have also changed? If so, is the query being used in the code still valid?

Data would be fetched from database only if the query returns one.
Back to top
View user's profile Send private message
matuwe
PostPosted: Fri Nov 16, 2012 2:31 am    Post subject: Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

Hi the database query is select * which is fine. Looking at the cache variable at runtime, I can see the new column being added. But the problem is when I then do a select from cache... The new columns don't show

Code:

DECLARE CacheMessageCategory SHARED ROW;

Load from DB
SET CacheMessageCategory.DestinationData[] = PASSTHRU( 'SELECT T.* FROM V_MESSAGECATEGORY T ORDER BY  Datatype desc,PRIORITY,SEQUENCENO  desc,ITEM desc' );

load  from Cache

SET Environment.XML.Category.MechanismPROP[] = (SELECT * FROM CacheMessageCategory .DestinationData[] AS S                                             WHERE S.MESSAGECATEGORYID = InputRoot.XMLNSC.messageCategoryID);



The problem is the new column is not showing on Environment.XML.Category.MechanismPROP[]

Thanks
Back to top
View user's profile Send private message
visasimbu
PostPosted: Fri Nov 16, 2012 3:19 am    Post subject: Reply with quote

Disciple

Joined: 06 Nov 2009
Posts: 171

Please try the below snippet.

Code:
DECLARE CacheMessageCategory SHARED ROW;

clear the shared row
SET CacheMessageCategory.InterMed = NULL;

Load from DB
SET CacheMessageCategory.InterMed.DestinationData[] = PASSTHRU( 'SELECT T.* FROM V_MESSAGECATEGORY T ORDER BY  Datatype desc,PRIORITY,SEQUENCENO  desc,ITEM desc' );

clear the Environment variable
SET Environment.XML.InterMed = NULL;


load  from Cache

SET Environment.XML.InterMed .Category.MechanismPROP[] = (SELECT * FROM CacheMessageCategory .DestinationData[] AS S                                             WHERE S.MESSAGECATEGORYID = InputRoot.XMLNSC.messageCategoryID);
Back to top
View user's profile Send private message Send e-mail
MBMQDeveloper
PostPosted: Sun Nov 18, 2012 10:03 pm    Post subject: Reply with quote

Novice

Joined: 02 Jul 2012
Posts: 19

Can you confirm if the above suggestion has worked?
Back to top
View user's profile Send private message
matuwe
PostPosted: Sun Nov 18, 2012 11:16 pm    Post subject: Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

Hi

Thanks, I will try this right away.

Thanks
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 CLEARING
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.