Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get baseCache from Dynacache with DistributedMap

122 views
Skip to first unread message

croes...@gmail.com

unread,
Nov 25, 2009, 8:41:33 AM11/25/09
to
Hi,
I am trying to get the 'baseCache' from dynacache with the DistributedMap class(from package com.ibm.websphere.cache)

According to the javadoc this should be possible with code similiar to:
{code}
InitialContext ic = new InitialContext();
DistributedMap dm =(DistributedMap)ic.lookup("services/cache/instance_one");
{code}
and I have managed to get various caches with this method (for example services/cache/iwk/global ) but never the 'baseCache'

So far the only way I have managed to get the baseCache is by using the deprecated Cache and ServerCache classes from com.ibm.ws.cache, but would preferably not use these deprecated classes.

So if anyone could point me in the right direction it would be greatly appreciated :) I'm doing this on portal 6.0.1.6

decoursey

unread,
Nov 30, 2009, 1:00:51 PM11/30/09
to
Good afternoon,
I am assuming your looking for the jndi name.

JNDI name of default cache or basecache is “services/cache/distributedmap”...

DistributedMap dm =(DistributedMap)ic.lookup("services/cache/distributedmap");

Is this what your looking for?

croes...@gmail.com

unread,
Dec 1, 2009, 4:51:24 AM12/1/09
to
I tried your suggestion and the cache that I got is the 'default' cache.

But you got me on the right track, and I soon found out that if you use,
{code}
DistributedMap dm =DynamicCacheAccessor.getDistributedMap();
{code}

you will get the 'baseCache'

thanks a lot for the help! :)

0 new messages