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 » Is there any alternative for Shared Variable

Post new topic  Reply to topic
 Is there any alternative for Shared Variable « View previous topic :: View next topic » 
Author Message
mahesh2069
PostPosted: Fri Sep 13, 2013 11:08 pm    Post subject: Is there any alternative for Shared Variable Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Hi All,

I want to load Cache cache for every 60 min, For that At first I want to maintain Cache Load time (Time Stamp),Here I maintain Cache Load time in Shared Variable. For every message , I want to check elapsed time , difference between current time stamp , Cache Load time.

I need to maintain Cache Load Time in Variable for every 60 min , It should be there for every message.For first time Shared Variable Used successfully , but after 60 min ,We cannot reassign Time Stamp of after Cache Reload in Shared Variable.

How to resolve this Issue ?
_________________
Thanks & Regards
Mahesh Mediboyina
WMB Developer
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Sep 13, 2013 11:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Can you please explain why you made this statement
Quote:

We cannot reassign Time Stamp of after Cache Reload in Shared Variable.


Are you getting an error?
How are you synchronising access to the shared variable?
Are you using more than one instance of the flow?

a little (or maybe a lot) more detail about the exact problem you are encountering would help a lot.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mahesh2069
PostPosted: Fri Sep 13, 2013 11:38 pm    Post subject: Only once we can initailize shared variable Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Hi
I did not get any error, but I did not get other than first time we can assign value to the shared variable , it would not take , It did not throw an Exception , But modified value not not assigned to shared variables.

So We cannot get modified Cache Load Time in the Shared variable ,So I got wrong result.

If broker will restart , it will take first time correctly.
_________________
Thanks & Regards
Mahesh Mediboyina
WMB Developer
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Sep 14, 2013 11:44 am    Post subject: Re: Only once we can initailize shared variable Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mahesh2069 wrote:
I did not get any error, but I did not get other than first time we can assign value to the shared variable , it would not take , It did not throw an Exception , But modified value not not assigned to shared variables.


There's a problem with your code. There's no reason why if you assign a value to a shared variable it will not "take" (to use your rather non-technical term) any more than if you assign a value to a local variable it doesn't change.

As my worthy associate points out, where there is a difference is why access is synchronized across different flows and you need to consider that.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Is there any alternative for Shared 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.