[jboss-dev-forums] [Design of POJO Server] - VFS and JBossAS initialization
alesj
do-not-reply at jboss.com
Mon Nov 3 08:53:18 EST 2008
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.
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=4186394#4186394
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186394
More information about the jboss-dev-forums
mailing list