[jboss-dev-forums] [Design of JBossCache] - Re: JBoss Cache and JBoss MC
alesj
do-not-reply at jboss.com
Thu Aug 16 07:28:50 EDT 2007
"manik.surtani at jboss.com" wrote : Hoping for an answer from the JBoss-MC guys. :-)
|
;-)
I would do it differently. :-)
First, I would have just one MC Kernel instance per CacheFactory.
If Kernel already exists - e.g. we are in JBossAS env - use that one.
This could also apply when we integrate MC into other app servers.
But if we are standalone or not yet app. server integrated, create new Kernel instance and plugin CacheFactory as a singleton bean.
And then for each -cache.cfg.xml (having your own ParserDeployer) I would create as many Configuration beans that would actually be BeanFactory and would, together with CacheFactory, instantiate Cache instance on createBean invocation - which would also mean that that would apply create, start methods invocations.
Or something like this:
You already have CachaFactory present.
Then for each -cache.cfg.xml install new Configuration bean and new Cache bean. But the Cache bean would have MANUAL mode, meaning you would move it though MC states by calling create, start on somesort of wrapper that would delegate these calls to MC's Controller.
Does this make sense?
For standalone you would use BasicBootstrap or StandaloneBootstrap, it depends which suites you best.
And stopping the MC would be done when you stop CacheFactory instance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074801#4074801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074801
More information about the jboss-dev-forums
mailing list