[jboss-user] [JBoss Cache: Core Edition] - Re: Do you prefer a tree or a plain map API for your project

mingfai do-not-reply at jboss.com
Sun Feb 22 18:06:56 EST 2009


it's good to have an option to get and put data without a node argument. I have a suggestion to add a defaultNode attribute and a set of API without the node argument (and assume to use the defaultNode)

I've just implemented a @JBossCache annotation to create and inject a Cache to any Spring-managed bean in Grails. By default,  for a class foo.Bar, the injected cache will have a getDefaultNode() method that returns a Fqn of "/foo/Bar". And using get(key) and put(key,value) will use the defaultNode. 

My implementation is with Groovy's MetaClass. And it could also be done by Java sub-classing. Or maybe the official distribution may consider to do in this way?





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

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



More information about the jboss-user mailing list