[jboss-user] [JBossCache] - Re: ClusteredCacheLoader + LOCAL CacheMode

bstansberry@jboss.com do-not-reply at jboss.com
Fri Nov 30 12:38:51 EST 2007


How about this?


  | for(int i = 0; i <noOfItems;i++) {
  |   Quote quote1 = new Quote(nodeName+requestCounter,"EWX","EUR");
  |   String path = "/quotes/"+quote1.getTreePath();
  |   cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
  |   cache.put(Fqn.fromString(path), "quote", quote1);		
  |   requestCounter++;
  | }
  | 

If that works, we may have got a problem with setting an Option before using Node.addChild(Object name).  The convenience API via the Cache interface provides a workaround as above, but it would be much better if this worked:


  | for(int i = 0; i <noOfItems;i++){
  |   Quote quote1 = new Quote(nodeName+requestCounter,"EWX","EUR");
  |   String path = "/quotes/"+quote1.getTreePath();
  |   TNode root = cache.getRoot();
  |   cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
  |   TNode child = root.addChild(path);
  |   cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
  |   child.put("quote", quote1);		
  |   requestCounter++;
  | }

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

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



More information about the jboss-user mailing list