[jboss-dev-forums] [Design of POJO Server] - Re: VFS and JBossAS initialization

adrian@jboss.org do-not-reply at jboss.com
Mon Nov 3 10:29:04 EST 2008


"alesj" wrote : In order to speed/cache things up, I suggest the following addition:
  | bootstrap.xml
  | 
  |   | <bootstrap xmlns="urn:jboss:bootstrap:1.0">
  |   | 
  |   |    <url>initialize.xml</url>
  |   |    <url>classloader.xml</url>
  |   | 
  | Where initialize.xml would look like:
  | 
  |   | <!--
  |   |    The JBossAS initializer configuration.
  |   | -->
  |   | <deployment xmlns="urn:jboss:bean-deployer:2.0">
  |   | 
  |   |   <bean name="VFSCache">
  |   |     <constructor factoryClass="org.jboss.virtual.spi.cache.VFSCacheFactory" factoryMethod="getInstance"/>
  |   |     <uninstall method="stop"/>
  |   |   </bean>
  |   | 
  |   |   <bean name="JBossVFSInitializer" class="org.jboss.virtual.plugins.cache.PreInitializeVFSContexts">
  |   |     <property name="initializedVFSContexts">
  |   |       <list elementClass="java.net.URL">
  |   |         <value>${jboss.lib.url}</value>
  |   |         <value>${jboss.server.lib.url}</value>
  |   |       </list>
  |   |     </property>
  |   |   </bean>
  |   | 
  |   |   <bean name="SingletonSchemaResolverFactory" class="org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory">
  |   |     <constructor factoryClass="org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory" factoryMethod="getInstance"/>
  |   |     <install method="addJaxbSchema">
  |   |       <parameter>urn:jboss:caching-classloader:1.0</parameter>
  |   |       <parameter>org.jboss.classloading.spi.vfs.metadata.CachingVFSClassLoaderFactory10</parameter>
  |   |     </install>
  |   |   </bean>
  |   | 
  |   | </deployment>
  |   | 
  | 
  | The first bean just says we should stop cache after we're done.
  | The 2nd one pre-initializes some of the most commonly used vfs roots,
  | hence pushing matching contexts into vfs cache.
  | The last is VFSClassLoaderFactory metadata that works off the vfs cache.
  | 

Why CachingVFSClassLoaderPolicy?

Remember our isA/hasA discussion?

Is a vfs classloader policy a vfs cache or can a vfs classloader policy 
have a vfs cache?

If like me you think it is the latter then it is not a subclass it is a property
(although you might conceivable temporarily subclass to experiment with
adding the property).

The scalability problem of maintaining and supporting a whole new schema should be
a warning sign. Are you going to create a new schema for every new feature?

anonymous wrote : 
  | I'm already running this, which results in this minimal cache:
  |  - http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186390#4186390
  | 
  | What do you think?

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

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



More information about the jboss-dev-forums mailing list