Author |
Message
|
chanukhya |
Posted: Fri Jul 05, 2013 9:19 am Post subject: Global cache Session Policy |
|
|
Newbie
Joined: 05 Jul 2013 Posts: 3
|
Hi,
I was trying to implement global caching with a session policy where i want my map to be removed in 60 sec. The code I was using is
Code: |
MbGlobalMapSessionPolicy sessionPol = new MbGlobalMapSessionPolicy(60);
MbGlobalMap myMap = MbGlobalMap.getGlobalMap("myMap", sessionPol); |
to create the session policy.
When i run this code, It throws me an error during runtime saying
java.lang.NoClassDefFoundError: com.ibm.broker.plugin.MbGlobalMapSessionPolicy
I imported the package and there are no errors in my code. The global caching works fine with out session policy.
Can any one provide a solution for this.
[/code] |
|
Back to top |
|
|
lancelotlinc |
Posted: Fri Jul 05, 2013 10:17 am Post subject: Re: Global cache Session Policy |
|
|
Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
chanukhya wrote: |
The global caching works fine with out session policy. |
When you put an entry to global cache in the working scenario, can you use MbExplorer to view the Global Cache Resource Manager and see in the log that the data actually went into the Global Cache?
In EG -> Properties -> Global Cache -> what is the listener port? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
|
chanukhya |
Posted: Fri Jul 05, 2013 11:48 am Post subject: |
|
|
Newbie
Joined: 05 Jul 2013 Posts: 3
|
The listener port is 2800. I set the port range from 2800 to 2819 in the policy file. the data is going into the global cache in the working senario. It was throwing error, if i use MbGlobalSessionPolicy |
|
Back to top |
|
|
lancelotlinc |
Posted: Fri Jul 05, 2013 11:52 am Post subject: |
|
|
Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
chanukhya wrote: |
The listener port is 2800. I set the port range from 2800 to 2819 in the policy file. the data is going into the global cache in the working senario. It was throwing error, if i use MbGlobalSessionPolicy |
What is the effective level of your runtime ? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
|
iShakir |
Posted: Mon Jul 08, 2013 4:59 am Post subject: Re: Global cache Session Policy |
|
|
Apprentice
Joined: 07 Mar 2013 Posts: 47
|
chanukhya wrote: |
Hi,
I was trying to implement global caching with a session policy where i want my map to be removed in 60 sec. The code I was using is
Code: |
MbGlobalMapSessionPolicy sessionPol = new MbGlobalMapSessionPolicy(60);
MbGlobalMap myMap = MbGlobalMap.getGlobalMap("myMap", sessionPol); |
to create the session policy.
When i run this code, It throws me an error during runtime saying
java.lang.NoClassDefFoundError: com.ibm.broker.plugin.MbGlobalMapSessionPolicy
I imported the package and there are no errors in my code. The global caching works fine with out session policy.
Can any one provide a solution for this.
[/code] |
If your runtime doesn't have fix pack 2 applied, apply it, this feature was only made available in fix pack 2. If it already is, ignore this step.
Then you will need to enable the fix-pack function for your broker, this can be done via:
Code: |
mqsichangebroker <broker_name> -f all |
Which I'm sure is what lancelotlinc was encouraging you towards
EDIT: Oh yeah, it's worth resetting your brokers cache after this. If you wish to use the default policy simply set your cache policy to disabled, start, stop again and set back to default. |
|
Back to top |
|
|
chanukhya |
Posted: Mon Jul 08, 2013 10:33 am Post subject: Version Problem?? |
|
|
Newbie
Joined: 05 Jul 2013 Posts: 3
|
Are you guys sure that it is the problem with version? i.e it only works on 8.0.0.2 and not on 8.0.0.1??
I tried to go through the release notes but i didn't find any thing about session policy in global caching.
can any one confirm that the session policy(expiration) doesn't work on 8.0.0.1 with some link or proof? |
|
Back to top |
|
|
mqjeff |
Posted: Mon Jul 08, 2013 10:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There are big number of important fixes in 8.0.0.2, that you should upgrade regardless of this or not.
Things that will cause your flows to simply drop messages, because they've been propagated to terminals that are unconnected in the internal model.
Otherwise, this is reasonably clear about what changes to Global Cache were made in 8.0.0.2. |
|
Back to top |
|
|
DP1234 |
Posted: Tue Aug 26, 2014 7:45 am Post subject: |
|
|
Apprentice
Joined: 25 May 2014 Posts: 40
|
Can anybody say what is the default session policy for Global Cache...i could see cache getting empty after couple of hours...though i have not set any session policy parameters |
|
Back to top |
|
|
|