Hi All,
I am facing a problem while implementing my own Cache Loader.
I have configured it into xml file. But I do not want to specify in "Preload" 
tag. As I want the cache loader to load the data at later some time on request.
I am calling follwoing line:
=============================
objTreeCache.get(fqn);
===========================
I noticed that before returing from myloader.exist(fqn) it is calling _get(fqn) 
and based an attribute of the class 
"org.jboss.cache.interceptors.CacheLoaderInterceptor" i.e. 
load_attributes=false; 
it is not able to call the method "private void 
loadAttributesFromCacheLoader(Node n) of the same class which actually will 
return the map with values. This is because the attribute is false. The code it 
executes for CacheLoaderInterceptor is as follows:
==========================================
public Object invoke(MethodCall m) throws Throwable {
.
.
 else if(meth.equals(TreeCache.getNodeMethodLocal)) {
         fqn=(Fqn)args[0];
      }//note that it does not set the attribute to "true"
============================================
Therefore I am getting the Map as {jboss:internal:uninitialized=null}

Whereas if I put my cache loader in "Preload" xml configuration then the 
get(fqnname, "bla", true) is getting called which actually sets this attribute 
to true in the follwing lines of CacheLoaderInterceptor class:
======================================== 
public Object invoke(MethodCall m) throws Throwable {
.
.
else if(meth.equals(TreeCache.getKeyValueMethodLocal)) {
         fqn=(Fqn)args[0];
         load_attributes=true;
      }
========================================

However, if I call get(fqn, key) with no preload, it is working fine.

Can you please help me in solving this problem?
I am not able to understand that why cant I use "objTreecache.get(fqn)"

Your instant help would be much appreciated.
Thanks in advance
Saroj
 


 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940610#3940610

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940610


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to