[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-12-01 Thread [EMAIL PROTECTED]
"nine_mirrors" wrote : 
  | I've checked out jboss-head and rebuilt it. Calling the cache loader is now 
done from the interceptor. 
  | However, is calling TreeCache.get(Fqn) supposed to result in a call to 
CacheLoader.get(Fqn) if the node doesn't exist or the map empty?
  | 

Yes, because the node might have been evicted, and we need to ask the 
CacheLoader whether it has the node and its attrs in store.

anonymous wrote : 
  | If invoke is called with the source method GetNodeMethodLocal then 
load_attributes is NOT set to true. 
  | 

Good question. The reason I don't load attributes here is that get(FQN) returns 
a Node, and is used for traversal of the tree. If you just want to traverse, 
then each node's attributes along the traversal will be loaded, which is bad. 
If you want to load attrs as well, use either preload(FQN) for a subtree, or 
access any key (the attrs will be loaded just-in-time then).

So Node get(FQN) just loads the Node into memory, but *not* the attributes.

Bela

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-12-01 Thread nine_mirrors
"[EMAIL PROTECTED]" wrote : This may be a bug in 1.1, but it is definitely 
calling the CacheLoader in 1.2:
  |public Node get(Fqn fqn) throws CacheException {
  |   |   MethodCall m=new MethodCall(getNodeMethodLocal, new 
Object[]{fqn});
  |   |   return (Node)invokeMethod(m);
  |   |}
  | 
  | The invokeMethod() passes the call through the interceptor chain, one of 
the interceptors is the CacheLoader.
  | Can you try with 1.2 (either from CVS head, or wait until mid December) ?
  | 
  | 
  | Bela

I've checked out jboss-head and rebuilt it. Calling the cache loader is now 
done from the interceptor. 
However, is calling TreeCache.get(Fqn) supposed to result in a call to 
CacheLoader.get(Fqn) if the node doesn't exist or the map empty?

If invoke is called with the source method GetNodeMethodLocal then 
load_attributes is NOT set to true. 

/Erik
ps somehthing seems to be screwed with this forum (behaviour-wise). I tried to 
pm you byt that doesn't work.

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-30 Thread [EMAIL PROTECTED]
2 solutions if you can't wait:

#1 Change the code in 1.1.1

#2 Check out 1.2 from CVS (1 bug remains to be fixed though with non-shared 
CacheLoaders):
cd jboss-head/build
build.sh
cd ../cache/output/lib
cp jboss-cache.jar JBOSS_HOME/server//lib

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-30 Thread nine_mirrors
"[EMAIL PROTECTED]" wrote : This may be a bug in 1.1, but it is definitely 
calling the CacheLoader in 1.2:
  |public Node get(Fqn fqn) throws CacheException {
  |   |   MethodCall m=new MethodCall(getNodeMethodLocal, new 
Object[]{fqn});
  |   |   return (Node)invokeMethod(m);
  |   |}
  | 
  | The invokeMethod() passes the call through the interceptor chain, one of 
the interceptors is the CacheLoader.
  | Can you try with 1.2 (either from CVS head, or wait until mid December) ?
  | 
  | 
  | Bela

In the code I'm looking (I dl:ed jboss-3.2.7RC1 src) there is no 
'getMethodNodeLocal' in TreeCache.java.
In 1.2, does the interceptor also do get() rather than just put() (as it did in 
1.1)?

I don't think I can wait until december. I'll try and dl head and build it 
myself.

/Erik

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-30 Thread [EMAIL PROTECTED]
What you can do as a workaround is:
cache.getKeys("/a/b/c");
  | Node n=cache.get("/a/b/c");

then the node n will have read its attributes from the CacheLoader.

Bela

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-30 Thread [EMAIL PROTECTED]
BTW: once you have a Node, note that if you update it, the method calls are not 
intercepted, therefore all the properties provided by the interceptors 
(locking, cacheloading, replication etc) are not  applied !

Bela

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-30 Thread [EMAIL PROTECTED]
This may be a bug in 1.1, but it is definitely calling the CacheLoader in 1.2:
   public Node get(Fqn fqn) throws CacheException {
  |   MethodCall m=new MethodCall(getNodeMethodLocal, new Object[]{fqn});
  |   return (Node)invokeMethod(m);
  |}

The invokeMethod() passes the call through the interceptor chain, one of the 
interceptors is the CacheLoader.
Can you try with 1.2 (either from CVS head, or wait until mid December) ?


Bela

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-29 Thread nine_mirrors
Since my original posting was truncated, here comes the rest:

it executes the n.createChild(...) but never calls the CacheLoader to get the 
data. Do I misunderstand what the TreeCache.get(Fqn) method is supposed to do 
(ie fetch the data from 2nd store if not available in the local cache)? 
I'm rather confused at this point.

Also, looking at the TreeCache code it seems like TreeCache.get(Fqn, key) would 
result in calling CacheLoader.get(Fqn) which means that I could use this method 
instead. On the other hand this only increases my confusion.

Grateful for any help

Erik Svensson

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossCache] - Re: YACL (Yet Another CacheLoader) question

2004-11-29 Thread nine_mirrors
Is there a specific reason why my posting was truncated? 
Is there something wrong with the forum code?

/Erik
"nine_mirrors" wrote : Howdy all,
  | 
  | I'm (still) implementing a cache loader and trying to get a feel for how it 
works. 
  | I'm wondering about TreeCache.get(Fqn). It does not seem to call 
CacheLoader.get(Fqn) (which it should in my opinion).
  | 
  | My code: 
  | 
  | TreeCache cache = new TreeCache();
  |   .
  |   .
  | Node node = cache.get(new Fqn("top_node");
  | 
  |  I trace the excution to TreeCache.findNode() and to this snippet:
  | 
  | // try CacheLoader if node is not in cache
  |  if(child_node == null && cache_loader != null) {
  | try {
  |if(cache_loader.exists(fqn)) {
  |   child_node=n.createChild(child_name, tmp_fqn, n, 
UNINITIALIZED, null);
  |   notifyNodeLoaded(tmp_fqn);
  |}
  | }
  | 

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development