[jboss-cvs] JBossAS SVN: r80507 - in trunk: server/src/etc/conf/default and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 4 11:01:32 EST 2008
Author: alesj
Date: 2008-11-04 11:01:32 -0500 (Tue, 04 Nov 2008)
New Revision: 80507
Added:
trunk/server/src/etc/conf/default/initialize.xml
trunk/server/src/etc/deploy/vfs-jboss-beans.xml
trunk/server/src/main/org/jboss/deployment/vfs/
trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatistics.java
trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java
Modified:
trunk/component-matrix/pom.xml
trunk/server/src/etc/conf/default/aop.xml
trunk/server/src/etc/conf/default/bindings.xml
trunk/server/src/etc/conf/default/bootstrap-minimal.xml
trunk/server/src/etc/conf/default/bootstrap-repo.xml
trunk/server/src/etc/conf/default/bootstrap.xml
trunk/server/src/etc/conf/default/classloader.xml
trunk/server/src/etc/conf/default/deployers.xml
trunk/server/src/etc/conf/default/jmx.xml
trunk/server/src/etc/conf/default/profile-repository.xml
trunk/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java
Log:
Update libs - VFS, MDR, MC, CL, Deployers, Seam-int.
Add initialize.xml --> we should run AS with -Djboss.vfs.cache=org.jboss.virtual.plugins.cache.WeakRefVFSCache.
Remove '/' after system property - it's already at the end.
Add VFSCacheStats bean.
Make VFSScanner use cached vfs.
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/component-matrix/pom.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -55,12 +55,12 @@
<version.org.jboss.ejb3.security.client>1.0.0-Beta1</version.org.jboss.ejb3.security.client>
<version.org.jboss.jpa>1.0.0-Beta2</version.org.jboss.jpa>
<version.org.jboss.reflect>2.0.0.GA</version.org.jboss.reflect>
- <version.org.jboss.vfs>2.0.0.CR1</version.org.jboss.vfs>
- <version.org.jboss.mdr>2.0.0.GA</version.org.jboss.mdr>
+ <version.org.jboss.vfs>2.0.0.CR2</version.org.jboss.vfs>
+ <version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
<version.org.jboss.man>2.0.0.CR3</version.org.jboss.man>
- <version.org.jboss.microcontainer>2.0.0.CR3</version.org.jboss.microcontainer>
- <version.org.jboss.cl>2.0.0.CR4</version.org.jboss.cl>
- <version.org.jboss.deployers>2.0.0.CR3</version.org.jboss.deployers>
+ <version.org.jboss.microcontainer>2.0.0.CR5</version.org.jboss.microcontainer>
+ <version.org.jboss.cl>2.0.0.CR5</version.org.jboss.cl>
+ <version.org.jboss.deployers>2.0.0.CR4</version.org.jboss.deployers>
<version.org.jboss.cache.core>3.0.0.CR4</version.org.jboss.cache.core>
<version.org.jboss.cache.pojo>3.0.0.CR4</version.org.jboss.cache.pojo>
<version.org.jboss.cluster>1.1.0.GA</version.org.jboss.cluster>
@@ -78,7 +78,7 @@
<version.sun-jaxws>2.1.1</version.sun-jaxws>
<version.sun.jaxb>2.1.4</version.sun.jaxb>
<version.xdoclet>1.2.3</version.xdoclet>
- <version.seam.integration>5.0.0.CR6</version.seam.integration>
+ <version.seam.integration>5.0.0.CR7</version.seam.integration>
</properties>
<!-- Build Configuration -->
Modified: trunk/server/src/etc/conf/default/aop.xml
===================================================================
--- trunk/server/src/etc/conf/default/aop.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/aop.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -8,10 +8,10 @@
<classloader><inject bean="aop-classloader:0.0.0"/></classloader>
<classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
- <root>${jboss.lib.url}/jboss-aop-asintegration-core.jar</root>
- <root>${jboss.lib.url}/jboss-aop-asintegration-jmx.jar</root>
- <root>${jboss.lib.url}/jboss-aop-asintegration-mc.jar</root>
- <root>${jboss.lib.url}/jboss-aop-jboss5.jar</root>
+ <root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
+ <root>${jboss.lib.url}jboss-aop-asintegration-jmx.jar</root>
+ <root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
+ <root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
</classloader>
<!-- Integration -->
Modified: trunk/server/src/etc/conf/default/bindings.xml
===================================================================
--- trunk/server/src/etc/conf/default/bindings.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/bindings.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -5,7 +5,7 @@
<classloader><inject bean="bindings-classloader:0.0.0"/></classloader>
<classloader name="bindings-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
- <root>${jboss.shared.lib.url}/jboss-bindingservice.jar</root>
+ <root>${jboss.shared.lib.url}jboss-bindingservice.jar</root>
</classloader>
<bean name="ServiceBindingManager" class="org.jboss.services.binding.ServiceBindingManager">
Modified: trunk/server/src/etc/conf/default/bootstrap-minimal.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap-minimal.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/bootstrap-minimal.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -6,6 +6,7 @@
-->
<bootstrap xmlns="urn:jboss:bootstrap:1.0">
+ <url>initialize.xml</url>
<url>classloader.xml</url>
<url>aop.xml</url>
<url>jmx.xml</url>
Modified: trunk/server/src/etc/conf/default/bootstrap-repo.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap-repo.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/bootstrap-repo.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -6,6 +6,7 @@
-->
<bootstrap xmlns="urn:jboss:bootstrap:1.0">
+ <url>initialize.xml</url>
<url>classloader.xml</url>
<url>aop.xml</url>
<url>jmx.xml</url>
Modified: trunk/server/src/etc/conf/default/bootstrap.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/bootstrap.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -6,6 +6,7 @@
-->
<bootstrap xmlns="urn:jboss:bootstrap:1.0">
+ <url>initialize.xml</url>
<url>classloader.xml</url>
<url>aop.xml</url>
<url>jmx.xml</url>
Modified: trunk/server/src/etc/conf/default/classloader.xml
===================================================================
--- trunk/server/src/etc/conf/default/classloader.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/classloader.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -26,27 +26,27 @@
<classloader name="bootstrap-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
<!-- FIXME Move to Deployers -->
- <root>${jboss.lib.url}/jboss-deployers-core-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-core.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-client-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-client.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-structure-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-impl.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-vfs-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-vfs.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-core-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-core.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-client-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-client.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-structure-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-vfs-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-vfs.jar</root>
<!-- System -->
- <root>${jboss.lib.url}/jboss-system.jar</root>
+ <root>${jboss.lib.url}jboss-system.jar</root>
<!-- FIXME Move to JMX -->
- <root>${jboss.lib.url}/jboss-j2se.jar</root>
- <root>${jboss.lib.url}/jboss-mbeans.jar</root>
- <root>${jboss.lib.url}/jboss-jmx.jar</root>
- <root>${jboss.lib.url}/jboss-system-jmx.jar</root>
- <root>${jboss.lib.url}/dom4j.jar</root>
+ <root>${jboss.lib.url}jboss-j2se.jar</root>
+ <root>${jboss.lib.url}jboss-mbeans.jar</root>
+ <root>${jboss.lib.url}jboss-jmx.jar</root>
+ <root>${jboss.lib.url}jboss-system-jmx.jar</root>
+ <root>${jboss.lib.url}dom4j.jar</root>
<!-- JAXB impl here, api is in endorsed -->
- <root>${jboss.lib.url}/jaxb-impl.jar</root>
+ <root>${jboss.lib.url}jaxb-impl.jar</root>
<!-- STAX2 impl here, api is in endorsed -->
- <root>${jboss.lib.url}/wstx.jar</root>
+ <root>${jboss.lib.url}wstx.jar</root>
</classloader>
</deployment>
Modified: trunk/server/src/etc/conf/default/deployers.xml
===================================================================
--- trunk/server/src/etc/conf/default/deployers.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/deployers.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -9,15 +9,15 @@
<classloader name="deployers-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
<!-- FIXME
- <root>${jboss.lib.url}/jboss-deployers-core-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-core.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-client-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-client.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-structure-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-impl.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-vfs-spi.jar</root>
- <root>${jboss.lib.url}/jboss-deployers-vfs.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-core-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-core.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-client-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-client.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-structure-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-vfs-spi.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-vfs.jar</root>
-->
</classloader>
Copied: trunk/server/src/etc/conf/default/initialize.xml (from rev 80304, trunk/server/src/etc/conf/default/classloader.xml)
===================================================================
--- trunk/server/src/etc/conf/default/initialize.xml (rev 0)
+++ trunk/server/src/etc/conf/default/initialize.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.shared.lib.url}</value>
+ <value>${jboss.server.lib.url}</value>
+ </list>
+ </property>
+ <property name="holdReference">true</property>
+ </bean>
+
+</deployment>
Modified: trunk/server/src/etc/conf/default/jmx.xml
===================================================================
--- trunk/server/src/etc/conf/default/jmx.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/jmx.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -9,11 +9,11 @@
<classloader name="jmx-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
<!-- FIXME
- <root>${jboss.lib.url}/jboss-j2se.jar</root>
- <root>${jboss.lib.url}/jboss-mbeans.jar</root>
- <root>${jboss.lib.url}/jboss-jmx.jar</root>
- <root>${jboss.lib.url}/jboss-system-jmx.jar</root>
- <root>${jboss.lib.url}/dom4j.jar</root>
+ <root>${jboss.lib.url}jboss-j2se.jar</root>
+ <root>${jboss.lib.url}jboss-mbeans.jar</root>
+ <root>${jboss.lib.url}jboss-jmx.jar</root>
+ <root>${jboss.lib.url}jboss-system-jmx.jar</root>
+ <root>${jboss.lib.url}dom4j.jar</root>
-->
</classloader>
Modified: trunk/server/src/etc/conf/default/profile-repository.xml
===================================================================
--- trunk/server/src/etc/conf/default/profile-repository.xml 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/server/src/etc/conf/default/profile-repository.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -26,13 +26,13 @@
<property name="storeRoot">${jboss.server.base.dir}</property>
<property name="applicationURIs">
<array elementClass="java.net.URI">
- <value>${jboss.server.home.url}/deploy</value>
+ <value>${jboss.server.home.url}deploy</value>
</array>
</property>
<property name="serializer"><inject bean="AttachmentsSerializer"/></property>
</bean>
<bean name="AttachmentsSerializer" class="org.jboss.system.server.profileservice.repository.JavaSerializationAttachmentsSerializer">
- <property name="attachmentsStoreDir">${jboss.server.home.dir}/attachments</property>
+ <property name="attachmentsStoreDir">${jboss.server.home.dir}attachments</property>
</bean>
<bean name="ProfileServiceBootstrap" class="org.jboss.system.server.profileservice.ProfileServiceBootstrap">
Added: trunk/server/src/etc/deploy/vfs-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deploy/vfs-jboss-beans.xml (rev 0)
+++ trunk/server/src/etc/deploy/vfs-jboss-beans.xml 2008-11-04 16:01:32 UTC (rev 80507)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="VFSCacheStatistics" class="org.jboss.deployment.vfs.VFSCacheStatistics">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.vfs:service=VFSCacheStatistics", exposedInterface=org.jboss.deployment.vfs.VFSCacheStatisticsMBean.class, registerDirectly=true)</annotation>
+ </bean>
+
+</deployment>
Added: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatistics.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatistics.java (rev 0)
+++ trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatistics.java 2008-11-04 16:01:32 UTC (rev 80507)
@@ -0,0 +1,98 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployment.vfs;
+
+import java.util.Collections;
+import java.util.Date;
+
+import org.jboss.virtual.spi.VFSContext;
+import org.jboss.virtual.spi.cache.CacheStatistics;
+import org.jboss.virtual.spi.cache.VFSCache;
+import org.jboss.virtual.spi.cache.VFSCacheFactory;
+
+/**
+ * Simple vfs cache statistics.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class VFSCacheStatistics implements VFSCacheStatisticsMBean
+{
+ private CacheStatistics statistics;
+
+ public String listCachedContexts()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("<table><tr><th>VFSContext - root URI</th></tr>");
+ for (VFSContext context : getStatistics().getCachedContexts())
+ {
+ builder.append("<tr>");
+ builder.append("<td>").append(context.getRootURI()).append("</td>");
+ builder.append("</tr>");
+ }
+ builder.append("</table>");
+ return builder.toString();
+ }
+
+ public int size()
+ {
+ return getStatistics().size();
+ }
+
+ public Date lastInsert()
+ {
+ long lastInsert = getStatistics().lastInsert();
+ return (lastInsert > 0) ? new Date(lastInsert) : null;
+ }
+
+ private CacheStatistics getStatistics()
+ {
+ if (statistics == null)
+ {
+ VFSCache cache = VFSCacheFactory.getInstance();
+ if (cache instanceof CacheStatistics)
+ {
+ statistics = CacheStatistics.class.cast(cache);
+ }
+ else
+ {
+ statistics = new CacheStatistics()
+ {
+ public Iterable<VFSContext> getCachedContexts()
+ {
+ return Collections.emptySet();
+ }
+
+ public int size()
+ {
+ return -1;
+ }
+
+ public long lastInsert()
+ {
+ return -1;
+ }
+ };
+ }
+ }
+ return statistics;
+ }
+}
Added: trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java (rev 0)
+++ trunk/server/src/main/org/jboss/deployment/vfs/VFSCacheStatisticsMBean.java 2008-11-04 16:01:32 UTC (rev 80507)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployment.vfs;
+
+import java.util.Date;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface VFSCacheStatisticsMBean
+{
+ /**
+ * List cached contexts.
+ *
+ * @return the cached contexts table
+ */
+ String listCachedContexts();
+
+ /**
+ * Get cache size.
+ *
+ * @return the cache size.
+ */
+ int size();
+
+ /**
+ * Get last insert timestamp.
+ *
+ * @return the last insert timestamp
+ */
+ Date lastInsert();
+}
\ No newline at end of file
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java 2008-11-04 15:39:55 UTC (rev 80506)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/VFSScanner.java 2008-11-04 16:01:32 UTC (rev 80507)
@@ -575,12 +575,17 @@
throw new IllegalArgumentException("Null file");
return deploymentFactory.createVFSDeployment(file);
}
-
- private VirtualFile getVFforURI(URI uri)
- throws IOException
+
+ /**
+ * Get virtual file for uri.
+ *
+ * @param uri the uri
+ * @return vritual file representing uri
+ * @throws IOException for any error
+ */
+ private VirtualFile getVFforURI(URI uri) throws IOException
{
- VFS vfs = VFS.getVFS(uri);
- return vfs.getRoot();
+ return VFS.getCachedFile(uri);
}
}
More information about the jboss-cvs-commits
mailing list