[jboss-dev-forums] [Design of JBossCache] - JBoss Cache and JBoss MC
manik.surtani@jboss.com
do-not-reply at jboss.com
Thu Aug 16 07:05:12 EDT 2007
Now that we're finally up and running with our new SVN repo and new set of maven scripts, I'm about to get started with the MC and just wanted to run a few things by everyone.
Keeping in mind that JBC is meant to be a standalone product, for use within the AS, or in other app servers, or even in a standalone case (e.g., in a standalone java program), I'm thinking of the best way to do this wrt. MC integration.
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();
So what I think is:
1. MC kernel is "created" when the cache factory creates the cache (line 2), with default values in jboss-beans.xml overridden with some values from cfg.
2. MC starts when cache.create() is called, and this instantiates and injects necessary beans.
3. MC stops when c.destroy() is called
Does this make sense? Am I on the right path here? If so, what would I use - for the above steps? BasicBootstrap?
Hoping for an answer from the JBoss-MC guys. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074795#4074795
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074795
More information about the jboss-dev-forums
mailing list