[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:36:12 EDT 2007


For doing a bootstrap:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/bootstrap/src/main/org/jboss/bootstrap/microcontainer/ServerImpl.java?revision=64576&view=markup

But I don't really get what your requirements are?
Why would you create a kernel for every cache?

In JBossAS we would want to inject the Cache[Factory] configured
via a JBoss deployment, e.g. deploy/jbossas-cache-beans.xml
We wouldn't want a seperate kernel.

More likely we want a cache specific schema that makes it easier to configure.
e.g. something like

  | @JAXBAnnotationsHere
  | public Cache implements BeanMetaDataFactory
  | {
  |    @XmlAttribute/Element(...)
  |    public setSomeProperty(...)
  | 
  |    List<BeanMetaData> getBeans()
  |    {
  |        // NOTE: This can be multiple beans
  |        return createTheEquivalentMetaDataForOurProperties();
  |    }
  | }
  | 

Then we can do:

  | <deployment xmlns="urn:jboss-bean-deployer:2.0">
  | 
  |     <!-- This gets converted to the BeanMetaData by the BeanMetaDataFactory above -->
  |    <cache xmlns="urn:jboss-cache:x.y">
  |        <some-property>blah</some-property>
  |    </cache>
  | </deployment>
  | 

Instead of

  | <deployment xmlns="urn:jboss-bean-deployer:2.0">
  |    <bean name="Cache" class="org.jboss.cache.UserShouldntHavetoKnowThis">
  |        <property name="someProperty">blah</property>
  |    </cache>
  | </deployment>
  | 

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

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



More information about the jboss-dev-forums mailing list