Forums de discussion

MULTIVMPOOL

Laxminarayana Vuppala, modifié il y a 13 années.

MULTIVMPOOL

New Member Publications: 5 Date d'inscription: 25/11/10 Publications récentes
Hi Folks,
Can there be any scenario while caching using MultiVMPool, a java.lang.String object is replicated in other cluster(server) but a Serialized Bean Object is not replicated?

Below is What we have done :

We are trying to put one bean into cache in one server and trying to retrive that bean in another server.
code snippet while putting an object in cache
MultiVMPoolUtil mpool = new MultiVMPoolUtil();

PortalCache cache = mpool.getCache("SimplePageCachingFilter");
SampleFormBean s13 = new SampleFormBean();
s13.setElementName("sample");

String str = new String("Hello World2");
if(cache.get("addElem") == null){
System.out.println("adding bean to cache>>>");
cache.put("addElem", s13);
}
code snippet while retrieving in other server.

MultiVMPoolUtil mpool = new MultiVMPoolUtil();

PortalCache cache = mpool.getCache("SimplePageCachingFilter");

if(cache.get("addElem") == null){
System.out.println("cache null>>>");
}
thumbnail
Nebojsa Dukanovic, modifié il y a 9 années.

RE: MULTIVMPOOL

New Member Publications: 4 Date d'inscription: 27/09/12 Publications récentes
hey,
i have just the same problem:
have you ever found a solution for that?

if yes, please let me know what you did.
i also have a clustered enviroment, i made all configurations in liferay-multi-vm-clustered.xml but i get null for my key from multiVMPoolUtil.
My cache is known on other servers, but not my object..