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 » Can we Flush Entire Global Cache at once??

Post new topic  Reply to topic Goto page 1, 2  Next
 Can we Flush Entire Global Cache at once?? « View previous topic :: View next topic » 
Author Message
DP1234
PostPosted: Tue Jun 17, 2014 4:46 am    Post subject: Can we Flush Entire Global Cache at once?? Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

I've a Scenario where in I have to Flush or delete entire global cache contents at once...,how can I achieve this..? One way is to iterate through all the cache elements and delete them (performance issues). Is there any way or inbuilt function to flush the entire global cache at once.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jun 17, 2014 5:24 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Global Cache of what?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
DP1234
PostPosted: Tue Jun 17, 2014 5:27 am    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

exerk wrote:
Global Cache of what?


Global Cache in IIB..,upon getting cache name as argument...i've flush that particular cache completley
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jun 17, 2014 6:05 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Moving this to the MESSAGE BROKER forum...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
stoney
PostPosted: Tue Jun 17, 2014 6:14 am    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

You can clear a map using mqsicacheadmin:

Code:
mqsicacheadmin IB9NODE -c clearGrid -m myMapName
Back to top
View user's profile Send private message
DP1234
PostPosted: Tue Jun 17, 2014 10:11 am    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

stoney wrote:
You can clear a map using mqsicacheadmin:

Code:
mqsicacheadmin IB9NODE -c clearGrid -m myMapName


i wanted to perform this action in JCN..How can i do that..?
I dont think JCN lets to run OS level commands..does it.?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 17, 2014 11:39 am    Post subject: Reply with quote

Grand High Poobah

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

DP1234 wrote:
I dont think JCN lets to run OS level commands..does it.?


JCN allows you to do anything you can do in Java. The fact that you're allowed to do something doesn't make it a good idea, and a number of things you can do in a JCN will bring various parts of the software crashing down.

The question is why you want to clear the entire cache from inside a JCN. What exactly is this requirement?

For the record, "I've been given a requirement to clear the cache programatically" is not, in fact, a requirement.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jun 17, 2014 5:46 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.

Vitor wrote:


For the record, "I've been given a requirement to clear the cache programatically" is not, in fact, a requirement.


I think you may need to explain that one. It maybe just as valid as

The requirement is that you do DR failover but you are not allowed to do any testing before the formal test begins.
_________________
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
Vitor
PostPosted: Wed Jun 18, 2014 4:46 am    Post subject: Reply with quote

Grand High Poobah

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

smdavies99 wrote:
Vitor wrote:


For the record, "I've been given a requirement to clear the cache programatically" is not, in fact, a requirement.


I think you may need to explain that one. It maybe just as valid as

The requirement is that you do DR failover but you are not allowed to do any testing before the formal test begins.


I'm looking for the reasoning behind clearing the cache programatically rather than via an administrative command separate to the running flow (but possibily still automated) or through cache expiry. What does the programatic option satisfy for the OP that the other options do not, and from this, are other & more satisfactory options open to them?

Explaination enough?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
DP1234
PostPosted: Wed Jun 18, 2014 5:29 am    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

am trying to execute my mqsicacheadmin command thru Java
Process P = Runtime.getRuntime().exec();

can anybdy suggest how to write command inside exec() block if my is something like

C:\Program Files\IBM\MQSI\9.0.0.0>mqsicacheadmin IB9NODE -c clearGrid -m myMapName
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 18, 2014 5:34 am    Post subject: Reply with quote

Grand High Poobah

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

DP1234 wrote:
am trying to execute my mqsicacheadmin command thru Java


One last time - why do you have to do this in Java? Why is this better that trying to spawn out another command shell (which is what that Java's doing), getting it correctly set up with mqsiprofile so the command works and then checking for the zero return code? None of which can of course have any adverse effects on the broker or expose any security risks. Honest.....

What is driving you to do this when easier options exist? Like just issuing the command outside of your flow from a properly configured shell?
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Wed Jun 18, 2014 5:35 am; edited 1 time in total
Back to top
View user's profile Send private message
McueMart
PostPosted: Wed Jun 18, 2014 5:35 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Well I wont write the java code for you, but one thing to bear in mind is that you might have to call mqsiprofile before you call mqsicacheadmin.
Back to top
View user's profile Send private message
DP1234
PostPosted: Wed Jun 18, 2014 10:07 pm    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

Is it possible to accomplish flushing entire data in psrticular map of global cache using Time to live concept..?

like this
MbGlobalMapSessionPolicy sessionPol = new MbGlobalMapSessionPolicy(60);
MbGlobalMap myMap = MbGlobalMap.getGlobalMap("myMap", sessionPol);

Running command through Java to delete cache is wrong approach is wat i felt after reading in couple of sites...and its not possible too

@Vitor...,thats wat the requirement is..we are trying of create an easier interface (not better though) (a SOAP request ) to clear the cache for the administrator instead of doing it in the command console (i agree it definatley hit performance)
Back to top
View user's profile Send private message
iShakir
PostPosted: Thu Jun 19, 2014 1:36 am    Post subject: Reply with quote

Apprentice

Joined: 07 Mar 2013
Posts: 47

Edit, that code you have written will ensure that any data written to the cache during your session lives for only 60 seconds, unless it is subsequently updated during that time.

I would also like to know why you would want to do this - especially if it's not satisfied by data expiry (time to live)
Back to top
View user's profile Send private message
DP1234
PostPosted: Thu Jun 19, 2014 2:52 am    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

iShakir wrote:
Edit, that code you have written will ensure that any data written to the cache during your session lives for only 60 seconds, unless it is subsequently updated during that time.

I would also like to know why you would want to do this - especially if it's not satisfied by data expiry (time to live)


I want to delete the map content completley something like what mqsicacheadmin clearGrid does...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Can we Flush Entire Global Cache at once??
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.