[jboss-dev-forums] [Design of JBossCache] - Re: JBoss Cache and JBoss MC
adrian@jboss.org
do-not-reply at jboss.com
Thu Aug 16 07:47:08 EDT 2007
"manik.surtani at jboss.com" wrote :
| The usual way for people to use the cache is to create one using the cache factory:
| 1: CacheFactory cf = DefaultCacheFactory.getInstance();
| 2: Cache c = cf.createCache(Configuration cfg); // cfg is a pojo that contains getters and setters for the various cfgs
| 3: c.create();
| 4: c.start();
|
The whole point of POJOising (IOC) is to get rid of this self configuration.
Instead the user would use JBossMC, Spring or something else
to inject the cache into their code.
| @Inject/@Resource
| public void setCache(Cache cache) {}
| or
| public void setCacheFactory(CacheFactory factory) {}
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074807#4074807
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074807
More information about the jboss-dev-forums
mailing list