[jboss-cvs] JBossAS SVN: r101688 - in trunk: cluster/src/main/java/org/jboss/profileservice/cluster/repository and 64 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 1 13:27:23 EST 2010


Author: johnbailey
Date: 2010-03-01 13:27:16 -0500 (Mon, 01 Mar 2010)
New Revision: 101688

Added:
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AutoUnmounter.java
Removed:
   trunk/server/src/main/java/org/jboss/deployment/vfs/
Modified:
   trunk/build/build.xml
   trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java
   trunk/component-matrix/pom.xml
   trunk/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
   trunk/connector/src/main/java/org/jboss/resource/deployers/RARParserDeployer.java
   trunk/connector/src/main/java/org/jboss/resource/deployers/management/DsDataSourceTemplate.java
   trunk/deployment/src/main/java/org/jboss/deployment/services/DeploymentManagerService.java
   trunk/ejb3/pom.xml
   trunk/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/AppClientScanningDeployer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/EJBRegistrationDeployer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3DependenciesDeployer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3Deployer.java
   trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
   trunk/hibernate-int/src/main/java/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java
   trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java
   trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/HibernateMappingVisitor.java
   trunk/profileservice/src/main/java/org/jboss/profileservice/management/AbstractTemplateCreator.java
   trunk/profileservice/src/main/java/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java
   trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/AbstractDeployHandler.java
   trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/DeployHandler.java
   trunk/security/src/main/java/org/jboss/security/deployers/AclConfigParsingDeployer.java
   trunk/security/src/main/java/org/jboss/security/deployers/JAXBElementParsingDeployer.java
   trunk/server/pom.xml
   trunk/server/src/etc/conf/all/bootstrap/deployers.xml
   trunk/server/src/etc/conf/all/bootstrap/profile.xml
   trunk/server/src/etc/conf/all/bootstrap/vfs.xml
   trunk/server/src/etc/conf/default/bootstrap/profile.xml
   trunk/server/src/etc/deploy/jboss-logging.xml
   trunk/server/src/etc/deploy/vfs-jboss-beans.xml
   trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
   trunk/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java
   trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/EARStructure.java
   trunk/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/PUHackDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java
   trunk/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java
   trunk/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java
   trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
   trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java
   trunk/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java
   trunk/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java
   trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
   trunk/server/src/main/java/org/jboss/web/deployers/WARStructure.java
   trunk/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java
   trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java
   trunk/system-jmx/src/main/java/org/jboss/system/server/jmx/JMXKernel.java
   trunk/system/pom.xml
   trunk/system/src/main/java/org/jboss/deployers/plugins/scanner/VFSDeploymentScannerImpl.java
   trunk/system/src/main/java/org/jboss/system/server/profile/repository/AbstractImmutableProfile.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/VFSScanner.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/attachments/AttachmentStore.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/PersistenceModificationChecker.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/ProfileServicePersistenceDeployer.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractAttachmentStore.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractDeploymentRepository.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractProfileDeployment.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractVFSProfileSource.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/BasicDeploymentRepository.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultDeploymentRepositoryFactory.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultProfileDeploymentFactory.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/FilteredProfileFactory.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/HotDeploymentRepository.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepositoryFactory.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/RepositoryClusteringHandler.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/AbstractLocalContentManager.java
   trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManager.java
   trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java
   trunk/system/src/resources/tests/bootstrap/defaulthotdeploy/deployer-beans.xml
   trunk/system/src/tests/org/jboss/test/server/profileservice/support/MockAttachmentStore.java
   trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java
   trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java
   trunk/testsuite/build.sh
   trunk/testsuite/build.xml
   trunk/testsuite/imports/server-config.xml
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeploymentRepoAddContentTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHotDeployUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHugeDeploymentUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ChannelFactoryManagedObjectsTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ClusterPartitionManagedObjectsTestCase.java
   trunk/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java
   trunk/testsuite/src/main/org/jboss/test/deployers/seam/test/SeamVFSClassloadingUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java
   trunk/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java
   trunk/testsuite/src/main/org/jboss/test/webservice/WebserviceTestBase.java
   trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExampleTestCase.java
   trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExplodedExampleTestCase.java
   trunk/testsuite/src/main/org/jboss/test/webservice/jbas5614/JBAS5614TestCase.java
   trunk/testsuite/src/main/org/jboss/test/webservice/jbws309/JBWS309TestCase.java
   trunk/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml
   trunk/testsuite/src/resources/test-configs/jaspi/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
   trunk/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
   trunk/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/JBossContextConfig.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/VFSDirContext.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java
   trunk/tomcat/src/resources/standalone/war-deployers-jboss-beans.xml
   trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
   trunk/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java
   trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
   trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
   trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
Log:
[JBAS-7342] - Integrate VFS3 changes into JBossAS trunk

Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/build/build.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -1962,6 +1962,10 @@
       <fileset refid="org.jboss.ejb3:jboss-ejb3-timerservice-spi:jar"/>
       <fileset refid="org.jboss.ejb3:jboss-ejb3-transactions:jar"/>
       <fileset refid="org.jboss.ejb3:jboss-ejb3_1:jar"/>
+      <fileset refid="org.jboss.ejb3.timeout:jboss-ejb3-timeout-spi:jar"/>
+      <fileset refid="org.jboss.ejb3.timeout:jboss-ejb3-timeout-3.1:jar"/>
+      <fileset refid="org.jboss.ejb3.vfs:jboss-ejb3-vfs-spi:jar"/>
+      <fileset refid="org.jboss.ejb3.vfs:jboss-ejb3-vfs-impl-vfs3:jar"/>      
       <fileset refid="org.jboss.reloaded:jboss-reloaded-naming:jar"/>
       <fileset refid="org.jboss.reloaded:jboss-reloaded-naming-deployers:jar"/>
       <fileset refid="org.hibernate:hibernate-core:jar"/>
@@ -1973,6 +1977,7 @@
       <fileset refid="org.hibernate:hibernate-validator-legacy:jar"/>
       <fileset refid="org.jboss.interceptor:jboss-interceptor-api:jar"/>
       <fileset refid="org.jboss.jpa:jboss-jpa-deployers:jar"/>
+      <fileset refid="org.jboss.jpa:jboss-jpa-vfs3:jar"/>
       <fileset refid="org.jboss.jpa:jboss-jpa-impl:jar"/>
       <fileset refid="org.jboss.jpa:jboss-jpa-spi:jar"/>
       <fileset refid="org.jboss.aspects:jboss-current-invocation-aspects:jar"/>

Modified: trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java
===================================================================
--- trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -56,7 +56,7 @@
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationReadAction;
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationRemoteAction;
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationWriteAction;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * {@link RepositoryClusteringHandler} implementation that uses {@link HAPartition}.

Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/component-matrix/pom.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -59,39 +59,41 @@
     <version.org.hibernate.entity.manager>3.5.0-CR-1</version.org.hibernate.entity.manager>
     <version.org.hibernate.javax.persistence>1.0.0-CR-1</version.org.hibernate.javax.persistence>
     <version.org.hibernate.validator>4.0.2.GA</version.org.hibernate.validator>
-    <version.org.jboss.aop>2.1.8.GA</version.org.jboss.aop>
+    <version.org.jboss.aop>2.1.9.Alpha1</version.org.jboss.aop>
     <version.org.jboss.aspects.currentinvocation>1.0.1</version.org.jboss.aspects.currentinvocation>
     <version.org.jboss.aspects.remoting>1.0.1.GA</version.org.jboss.aspects.remoting>
     <version.org.jboss.aspects.security>1.0.1</version.org.jboss.aspects.security>
     <version.org.jboss.aspects.transaction>1.0.0.GA</version.org.jboss.aspects.transaction>
-    <version.org.jboss.bootstrap>2.1.0-alpha-3</version.org.jboss.bootstrap>
+    <version.org.jboss.bootstrap>2.1.0-alpha-4</version.org.jboss.bootstrap>
     <version.org.jboss.cache.core>3.2.1.GA</version.org.jboss.cache.core>
     <version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
-    <version.org.jboss.cl>2.2.0.Alpha2</version.org.jboss.cl>
+    <version.org.jboss.cl>2.2.0.Alpha3</version.org.jboss.cl>
     <version.org.jboss.classpool>1.0.0.Alpha2</version.org.jboss.classpool>
     <version.org.jboss.cluster.cache.jbc>2.1.2.GA</version.org.jboss.cluster.cache.jbc>
     <version.org.jboss.cluster.cache.spi>2.0.0.GA</version.org.jboss.cluster.cache.spi>
     <version.org.jboss.cluster.client>1.1.1.GA</version.org.jboss.cluster.client>
     <version.org.jboss.cluster.server.api>1.1.1.GA</version.org.jboss.cluster.server.api>
     <version.org.jboss.common.core>2.2.17.GA</version.org.jboss.common.core>
-    <version.org.jboss.deployers>2.2.0.Alpha1</version.org.jboss.deployers>
-    <version.org.jboss.ejb3>1.0.4</version.org.jboss.ejb3>
+    <version.org.jboss.deployers>2.2.0.Alpha3</version.org.jboss.deployers>
+    <version.org.jboss.ejb3>1.0.5</version.org.jboss.ejb3>
     <version.org.jboss.ejb3.common.client>1.0.2</version.org.jboss.ejb3.common.client>
-    <version.org.jboss.ejb3.core.client>1.2.2</version.org.jboss.ejb3.core.client>
+    <version.org.jboss.ejb3.core.client>1.2.3</version.org.jboss.ejb3.core.client>
     <version.org.jboss.ejb3.endpoint.deployer>0.1.4</version.org.jboss.ejb3.endpoint.deployer>
-    <version.org.jboss.ejb3.ext.api>1.1.0</version.org.jboss.ejb3.ext.api>
+    <version.org.jboss.ejb3.ext.api>1.1.1</version.org.jboss.ejb3.ext.api>
     <version.org.jboss.ejb3.jpa.int>2.0.0-alpha-1</version.org.jboss.ejb3.jpa.int>
     <version.org.jboss.ejb3.mc.int>1.0.2</version.org.jboss.ejb3.mc.int>
     <version.org.jboss.ejb3.metrics.deployer>1.0.2</version.org.jboss.ejb3.metrics.deployer>
-    <version.org.jboss.ejb3.proxy.clustered.client>1.0.2</version.org.jboss.ejb3.proxy.clustered.client>
+    <version.org.jboss.ejb3.proxy.clustered.client>1.0.3</version.org.jboss.ejb3.proxy.clustered.client>
     <version.org.jboss.ejb3.proxy.impl.client>1.0.6</version.org.jboss.ejb3.proxy.impl.client>
     <version.org.jboss.ejb3.proxy.spi.client>1.0.0</version.org.jboss.ejb3.proxy.spi.client>
-    <version.org.jboss.ejb3.security.client>1.0.0</version.org.jboss.ejb3.security.client>
+    <version.org.jboss.ejb3.security.client>1.0.2</version.org.jboss.ejb3.security.client>
+    <version.org.jboss.ejb3.timeout>0.1.1</version.org.jboss.ejb3.timeout>
+    <version.org.jboss.ejb3.vfs>1.0.0-alpha-1</version.org.jboss.ejb3.vfs>
     <version.org.jboss.ejb.api>1.0-alpha-1</version.org.jboss.ejb.api>
-    <version.org.jboss.integration>6.0.0-Alpha8</version.org.jboss.integration>
+    <version.org.jboss.integration>6.0.0.Alpha9</version.org.jboss.integration>
     <version.org.jboss.jbossxb>2.0.2.Beta3</version.org.jboss.jbossxb>
     <version.org.jboss.jopr>1.4.0.Beta1</version.org.jboss.jopr>
-    <version.org.jboss.jpa.deployers>1.0.1</version.org.jboss.jpa.deployers>
+    <version.org.jboss.jpa.deployers>1.0.2-alpha-1</version.org.jboss.jpa.deployers>
     <version.org.jboss.jpa.impl>2.0.0</version.org.jboss.jpa.impl>
     <version.org.jboss.jpa.spi>1.0.0</version.org.jboss.jpa.spi>
     <version.org.jboss.kernel>2.2.0.Alpha6</version.org.jboss.kernel>
@@ -99,11 +101,11 @@
     <version.org.jboss.logging-service-metadata>1.0.0.CR7</version.org.jboss.logging-service-metadata>
     <version.org.jboss.logmanager>1.1.1.GA</version.org.jboss.logmanager>
     <version.org.jboss.man>2.1.1.SP1</version.org.jboss.man>
-    <version.org.jboss.mcann>1.0.0.Alpha1</version.org.jboss.mcann>
+    <version.org.jboss.mcann>1.0.0.Alpha2</version.org.jboss.mcann>
     <version.org.jboss.mc-int>2.2.0.Alpha2</version.org.jboss.mc-int>
     <version.org.jboss.mdr>2.2.0.Alpha1</version.org.jboss.mdr>
     <version.org.jboss.metadata.client>2.0.0.Alpha</version.org.jboss.metadata.client>
-    <version.org.jboss.metadata.common>2.0.0-alpha-10</version.org.jboss.metadata.common>
+    <version.org.jboss.metadata.common>2.0.0.Alpha12</version.org.jboss.metadata.common>
     <version.org.jboss.metadata.ear>2.0.0.Alpha2</version.org.jboss.metadata.ear>
     <version.org.jboss.metadata.ejb>2.0.0-alpha-6</version.org.jboss.metadata.ejb>
     <version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
@@ -122,14 +124,14 @@
     <version.org.jboss.slf4j>1.0.2.GA</version.org.jboss.slf4j>
     <version.org.jboss.stdio>1.0.0.CR3</version.org.jboss.stdio>
     <version.org.jboss.threads>2.0.0.CR3</version.org.jboss.threads>
-    <version.org.jboss.vfs>2.2.0.Alpha2</version.org.jboss.vfs>
+    <version.org.jboss.vfs>3.0.0.CR2</version.org.jboss.vfs>
     <version.org.jboss.xnio>2.1.0.CR1</version.org.jboss.xnio>
     <version.org.jboss.xnio.metadata>2.1.0.CR1</version.org.jboss.xnio.metadata>
     <version.org.slf4j>1.5.6</version.org.slf4j>
     <version.org.springframework>2.5.6</version.org.springframework>
     <version.oswego-concurrent.concurrent>1.3.4-jboss-update1</version.oswego-concurrent.concurrent>
     <version.saaj.api>1.3</version.saaj.api>
-    <version.seam.integration>5.1.0.CR1</version.seam.integration>
+    <version.seam.integration>6.0.0.Alpha1</version.seam.integration>
     <version.spring.integration>1.0.0.CR2</version.spring.integration>
     <version.staxex>2.1.1</version.staxex>
     <version.streambuffer>1.0</version.streambuffer>
@@ -137,8 +139,8 @@
     <version.sun.jaxb>2.2</version.sun.jaxb>
     <version.sun-jaxws>2.2</version.sun-jaxws>
     <version.sun-policy>2.0-b01</version.sun-policy>
-    <version.weld.api>1.0</version.weld.api>
-    <version.weld.integration>6.0.0.Beta6</version.weld.integration>
+    <version.weld.api>1.0-SP1</version.weld.api>
+    <version.weld.integration>6.0.0.Beta8</version.weld.integration>
     <version.xdoclet>1.2.3</version.xdoclet>
   </properties>
 
@@ -1382,7 +1384,7 @@
         <artifactId>jboss-deployment-spi</artifactId>
         <version>${version.org.jboss.integration}</version>
       </dependency>
-      
+
       <!-- Combined integration jar.  Maybe this can be removed when we just use the 
         -  individual compoennts -->
       <dependency>
@@ -1974,8 +1976,28 @@
           </exclusion>
         </exclusions>
       </dependency>
-      
       <dependency>
+        <groupId>org.jboss.ejb3.timeout</groupId>
+        <artifactId>jboss-ejb3-timeout-3.1</artifactId>
+        <version>${version.org.jboss.ejb3.timeout}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.ejb3.vfs</groupId>
+        <artifactId>jboss-ejb3-vfs-spi</artifactId>
+        <version>${version.org.jboss.ejb3.vfs}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.ejb3.vfs</groupId>
+        <artifactId>jboss-ejb3-vfs-impl-vfs3</artifactId>
+        <version>${version.org.jboss.ejb3.vfs}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-vfs</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
         <groupId>org.jboss.ejb3</groupId>
         <artifactId>jboss-ejb3-endpoint-deployer</artifactId>
         <version>${version.org.jboss.ejb3.endpoint.deployer}</version>
@@ -2258,6 +2280,18 @@
 
       <dependency>
         <groupId>org.jboss.jpa</groupId>
+        <artifactId>jboss-jpa-vfs3</artifactId>
+        <version>${version.org.jboss.jpa.deployers}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.jboss.microcontainer</groupId>
+            <artifactId>jboss-aop-mc-int</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+
+      <dependency>
+        <groupId>org.jboss.jpa</groupId>
         <artifactId>jboss-jpa-impl</artifactId>
         <version>${version.org.jboss.jpa.impl}</version>
       </dependency>

Modified: trunk/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
===================================================================
--- trunk/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -46,7 +46,7 @@
 import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
 import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
 import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.XMLReaderFactory;

Modified: trunk/connector/src/main/java/org/jboss/resource/deployers/RARParserDeployer.java
===================================================================
--- trunk/connector/src/main/java/org/jboss/resource/deployers/RARParserDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/connector/src/main/java/org/jboss/resource/deployers/RARParserDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -33,7 +33,7 @@
 import org.jboss.resource.metadata.JBossRAMetaData;
 import org.jboss.resource.metadata.RARDeploymentMetaData;
 import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.xb.binding.ObjectModelFactory;
 
 /**

Modified: trunk/connector/src/main/java/org/jboss/resource/deployers/management/DsDataSourceTemplate.java
===================================================================
--- trunk/connector/src/main/java/org/jboss/resource/deployers/management/DsDataSourceTemplate.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/connector/src/main/java/org/jboss/resource/deployers/management/DsDataSourceTemplate.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -45,8 +45,8 @@
 import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
 import org.jboss.resource.metadata.mcf.TxConnectionFactoryDeploymentMetaData;
 import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * The connection factory template implementation.
@@ -93,7 +93,7 @@
       // Write template
       writeTemplate(dsXml, values);
       // Return virtual file
-      return VFS.getRoot(dsXml.toURI());
+      return VFS.getChild(dsXml.toURI());
    }
 
    public DeploymentTemplateInfo getInfo()

Modified: trunk/deployment/src/main/java/org/jboss/deployment/services/DeploymentManagerService.java
===================================================================
--- trunk/deployment/src/main/java/org/jboss/deployment/services/DeploymentManagerService.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/deployment/src/main/java/org/jboss/deployment/services/DeploymentManagerService.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -54,8 +54,8 @@
 import org.jboss.mx.util.MBeanServerLocator;
 import org.jboss.system.metadata.ServiceMetaData;
 import org.jboss.util.file.Files;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A service that supports the JSR-88 DeploymentManager operations.
@@ -353,7 +353,7 @@
       String archive = path.getName();
       File deployFile = new File(uploadDir, archive);
 
-      VirtualFile root = VFS.getRoot(deployFile.toURI());
+      VirtualFile root = VFS.getChild(deployFile.toURI());
       Deployment deployment = mainDeployer.getDeployment(getDeploymentName(root));
 
       /* TODO: that is a hack */
@@ -405,7 +405,7 @@
       if (deployFile.exists() == false)
          throw new IOException("deployURL(" + url + ") has no local archive");
 
-      VirtualFile root = VFS.getRoot(deployFile.toURI());
+      VirtualFile root = VFS.getChild(deployFile.toURI());
       Deployment deployment = deploymentFactory.createVFSDeployment(root);
       mainDeployer.addDeployment(deployment);
       DeploymentContext context = null;
@@ -457,7 +457,7 @@
       if (deployFile.exists() == false)
          throw new IOException("deployURL(" + url + ") has no local archive");
 
-      VirtualFile root = VFS.getRoot(deployFile.toURI());
+      VirtualFile root = VFS.getChild(deployFile.toURI());
       mainDeployer.removeDeployment(getDeploymentName(root));
       mainDeployer.process();
       moduleID.setRunning(false);

Modified: trunk/ejb3/pom.xml
===================================================================
--- trunk/ejb3/pom.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/pom.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -236,6 +236,14 @@
           <groupId>org.jboss.cache</groupId>
           <artifactId>jbosscache-core</artifactId>
         </exclusion>
+        <exclusion>
+        	<groupId>org.jboss.metadata</groupId>
+        	<artifactId>jboss-metadata</artifactId>
+        </exclusion>
+		<exclusion>
+        	<groupId>org.jboss.ejb3</groupId>
+			<artifactId>jboss-ejb3-core</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     
@@ -243,9 +251,52 @@
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-core</artifactId>
       <classifier>client</classifier>
+	  <exclusions>
+		<exclusion>
+        	<groupId>org.jboss.microcontainer</groupId>
+			<artifactId>jboss-dependency</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
+
+ 	<dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-core</artifactId>
+	  <version>${version.org.jboss.ejb3.core.client}</version>
+	  <exclusions>
+		<exclusion>
+        	<groupId>org.jboss.microcontainer</groupId>
+			<artifactId>jboss-dependency</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.microcontainer</groupId>
+	      <artifactId>jboss-kernel</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
     
     <dependency>
+      <groupId>org.jboss.ejb3.vfs</groupId>
+      <artifactId>jboss-ejb3-vfs-spi</artifactId>
+    </dependency>    
+    
+    <dependency>
+      <groupId>org.jboss.ejb3.vfs</groupId>
+      <artifactId>jboss-ejb3-vfs-impl-vfs3</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.ejb3.timeout</groupId>
+      <artifactId>jboss-ejb3-timeout-3.1</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>org.jboss.javaee</groupId>
       <artifactId>jboss-ejb-api</artifactId>
     </dependency>
@@ -258,6 +309,12 @@
     <dependency>
       <groupId>org.jboss.jbossas</groupId>
       <artifactId>jboss-as-connector</artifactId>
+      <exclusions>
+		<exclusion>
+        	<groupId>org.jboss.microcontainer</groupId>
+			<artifactId>jboss-dependency</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     
     <dependency>

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -48,6 +48,7 @@
 import org.jboss.ejb3.DependencyPolicy;
 import org.jboss.ejb3.InitialContextFactory;
 import org.jboss.ejb3.client.injection.ClientPersistenceUnitHandler;
+import org.jboss.ejb3.vfs.spi.VirtualFile;
 import org.jboss.injection.DependsHandler;
 import org.jboss.injection.EncInjector;
 import org.jboss.injection.InjectionContainer;
@@ -59,7 +60,6 @@
 import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
 import org.jboss.metadata.javaee.spec.RemoteEnvironment;
 import org.jboss.util.NotImplementedException;
-import org.jboss.virtual.VirtualFile;
 
 /**
  * Injection of the application client main class is handled from here.

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -53,6 +53,8 @@
 import org.jboss.ejb3.enc.MessageDestinationResolver;
 import org.jboss.ejb3.javaee.AbstractJavaEEComponent;
 import org.jboss.ejb3.javaee.SimpleJavaEEModule;
+import org.jboss.ejb3.vfs.spi.UnifiedVirtualFileFactory;
+import org.jboss.ejb3.vfs.spi.VirtualFile;
 import org.jboss.injection.DependsHandler;
 import org.jboss.injection.EncInjector;
 import org.jboss.injection.ExtendedInjectionContainer;
@@ -66,8 +68,6 @@
 import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
 import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
 import org.jboss.metadata.serviceref.ServiceReferenceHandler;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.virtual.VirtualFile;
 import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 
 /**
@@ -360,7 +360,7 @@
                      String encName = "env/" + name;
                      Context encCtx = getEnc();
 
-                     UnifiedVirtualFile vfsRoot = new VirtualFileAdaptor(getRootFile());
+                     UnifiedVirtualFile vfsRoot = UnifiedVirtualFileFactory.getInstance().create(getRootFile());
                      new ServiceReferenceHandler().bindServiceRef(encCtx, encName, vfsRoot, getClassloader(), sref);
 
                   }

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/AppClientScanningDeployer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/AppClientScanningDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/AppClientScanningDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -29,8 +29,8 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.metadata.client.jboss.JBossClientMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Scan the main & super classes for annotations.
@@ -99,17 +99,10 @@
          return null;
       }
 
-      try
-      {
-         Manifest mf = VFSUtils.readManifest(file);
-         Attributes attrs = mf.getMainAttributes();
-         String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
-         return className;
-      }
-      finally
-      {
-         file.close();
-      }
+      Manifest mf = VFSUtils.readManifest(file);
+      Attributes attrs = mf.getMainAttributes();
+      String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
+      return className;
    }
    
    // TODO: should we check for type of annotations?

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/EJBRegistrationDeployer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/EJBRegistrationDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/EJBRegistrationDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -40,7 +40,7 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ear.jboss.JBossAppMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Creates initial EJB deployments and initializes only basic metadata.

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3ClientDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -48,8 +48,8 @@
 import org.jboss.metadata.client.jboss.JBossClientMetaData;
 import org.jboss.metadata.ear.jboss.JBossAppMetaData;
 import org.jboss.naming.Util;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Deploys a client application jar.
@@ -236,20 +236,13 @@
 
       if (file != null)
       {
-         try
+         Manifest mf = VFSUtils.readManifest(file);
+         Attributes attrs = mf.getMainAttributes();
+         String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
+         if (className != null)
          {
-            Manifest mf = VFSUtils.readManifest(file);
-            Attributes attrs = mf.getMainAttributes();
-            String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
-            if (className != null)
-            {
-               mainClassName = className;
-            }
+            mainClassName = className;
          }
-         finally
-         {
-            file.close();
-         }
       }
       return mainClassName;
    }

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3DependenciesDeployer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3DependenciesDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3DependenciesDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -64,7 +64,7 @@
             unit.getTopLevel().addAttachment(DependenciesMetaData.class, dependencies);
             */
             //ControllerContext context = unit.getAttachment(ControllerContext.class);
-            unit.addIDependOn(new AbstractDependencyItem(unit.getName(), TransactionManager.class, new ControllerState("Real"), ControllerState.INSTALLED));
+            unit.addIDependOn(new AbstractDependencyItem(unit.getName(), TransactionManager.class, ControllerState.getInstance("Real"), ControllerState.INSTALLED));
          }
 
          private DependencyItemMetaData createDependencyItemMetaData(String name)
@@ -73,7 +73,7 @@
             item.setValue(name);
             // This is ugly, MC checks on String value
             //item.setWhenRequired(new ControllerState(DeploymentStages.REAL.toString()));
-            item.setWhenRequired(new ControllerState("Real"));
+            item.setWhenRequired(ControllerState.getInstance("Real"));
             item.setDependentState(ControllerState.INSTALLED);
             return item;
          }

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3Deployer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3Deployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/Ejb3Deployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -48,7 +48,7 @@
 import org.jboss.kernel.spi.deployment.KernelDeployment;
 import org.jboss.metadata.ear.jboss.JBossAppMetaData;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Deployes EJB 3 components based on meta data coming from JBossEjbParsingDeployer.

Modified: trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -24,6 +24,8 @@
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Hashtable;
 import java.util.List;
@@ -31,12 +33,12 @@
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
+import org.jboss.ejb3.vfs.impl.vfs3.VirtualFileFilterAdapter;
+import org.jboss.ejb3.vfs.impl.vfs3.VirtualFileWrapper;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.FilterVirtualFileVisitor;
+import org.jboss.vfs.util.SuffixesExcludeFilter;
 
 /**
  * Comment
@@ -79,9 +81,9 @@
       return unit.removeAttachment(name);
    }
 
-   public VirtualFile getRootFile()
+   public org.jboss.ejb3.vfs.spi.VirtualFile getRootFile()
    {
-      return unit.getFile("");
+      return new VirtualFileWrapper(unit.getFile(""));
    }
    
    public String getRelativePath()
@@ -139,9 +141,9 @@
       return extractDescriptorUrl("jboss.xml");
    }
 
-   public VirtualFile getMetaDataFile(String name)
+   public org.jboss.ejb3.vfs.spi.VirtualFile getMetaDataFile(String name)
    {
-      return unit.getMetaDataFile(name);
+      return new VirtualFileWrapper(unit.getMetaDataFile(name));
    }
    
    public List<Class> getClasses()
@@ -203,7 +205,7 @@
       return interceptorInfoRepository;
    }
 
-   public List<VirtualFile> getResources(VirtualFileFilter filter)
+   public List<org.jboss.ejb3.vfs.spi.VirtualFile> getResources(org.jboss.ejb3.vfs.spi.VirtualFileFilter filter)
    {
       List<VirtualFile> classPath = unit.getClassPath();
       if(classPath == null || classPath.isEmpty())
@@ -211,9 +213,9 @@
 
       VisitorAttributes va = new VisitorAttributes();
       va.setLeavesOnly(true);
-      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
+      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(Arrays.asList(".zip", ".ear", ".jar", ".rar", ".war", ".sar",".har", ".aop")); // TODO:  Where should these come from?
       va.setRecurseFilter(noJars);
-      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
+      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(new VirtualFileFilterAdapter(filter), va);
 
       for(VirtualFile root : classPath)
       {
@@ -232,14 +234,19 @@
             throw new RuntimeException(e);
          }
       }
-      
-      return visitor.getMatched();
+      final List<VirtualFile> matches = visitor.getMatched(); 
+      final List<org.jboss.ejb3.vfs.spi.VirtualFile> wrappedMatches = new ArrayList<org.jboss.ejb3.vfs.spi.VirtualFile>(matches.size());
+      for(VirtualFile match : matches) 
+      {
+         wrappedMatches.add(new VirtualFileWrapper(match));
+      }
+      return wrappedMatches;
    }
    
    private static boolean isChildOf(VirtualFile other, final VirtualFile file)
       throws IOException
    {
-      for(VirtualFile child : other.getChildren())
+      for(org.jboss.vfs.VirtualFile child : other.getChildren())
       {
          if(child.equals(file))
             return true;

Modified: trunk/hibernate-int/src/main/java/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java
===================================================================
--- trunk/hibernate-int/src/main/java/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/hibernate-int/src/main/java/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -33,7 +33,7 @@
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 import org.jboss.hibernate.jmx.Hibernate;
 import org.jboss.util.id.GUID;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Hibernate session factory metadata.

Modified: trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java
===================================================================
--- trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -23,6 +23,7 @@
 
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Collections;
 import java.util.Date;
@@ -55,8 +56,8 @@
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.logging.Logger;
 import org.jboss.util.naming.Util;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * The {@link HibernateMBean} implementation.
@@ -394,14 +395,14 @@
       }
    }
 
-   private void handleMappings(Configuration cfg) throws IOException
+   private void handleMappings(Configuration cfg) throws IOException, URISyntaxException
    {
       if (root == null)
       {
          if (harUrl == null)
             throw new IllegalArgumentException("Must set one of the resources, root or harUrl: " + this);
 
-         root = VFS.getRoot(harUrl);
+         root = VFS.getChild(harUrl);
       }
 
       log.debug("Scanning for Hibernate mappings, root: " + root);

Modified: trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/HibernateMappingVisitor.java
===================================================================
--- trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/HibernateMappingVisitor.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/hibernate-int/src/main/java/org/jboss/hibernate/jmx/HibernateMappingVisitor.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -25,9 +25,9 @@
 import java.util.Set;
 import java.util.HashSet;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * Mapping visitor, matching .hbm.xml files.

Modified: trunk/profileservice/src/main/java/org/jboss/profileservice/management/AbstractTemplateCreator.java
===================================================================
--- trunk/profileservice/src/main/java/org/jboss/profileservice/management/AbstractTemplateCreator.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/profileservice/src/main/java/org/jboss/profileservice/management/AbstractTemplateCreator.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -28,7 +28,7 @@
 import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
 import org.jboss.managed.api.DeploymentTemplateInfo;
 import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A basic template creator, which applies and distributes the template.

Modified: trunk/profileservice/src/main/java/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java
===================================================================
--- trunk/profileservice/src/main/java/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/profileservice/src/main/java/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -51,8 +51,8 @@
 import org.jboss.metatype.api.values.MetaValueFactory;
 import org.jboss.metatype.api.values.SimpleValue;
 import org.jboss.metatype.plugins.values.MetaValueFactoryBuilder;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -112,7 +112,7 @@
       // Write template
       writeTemplate(dsXml, values);
       // Return virtual file
-      return VFS.getRoot(dsXml.toURI());
+      return VFS.getChild(dsXml.toURI());
    }
 
    public void updateTemplateDeployment(VFSDeployment ctx, DeploymentTemplateInfo values) throws Exception

Modified: trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/AbstractDeployHandler.java
===================================================================
--- trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/AbstractDeployHandler.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/AbstractDeployHandler.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -21,7 +21,9 @@
  */ 
 package org.jboss.profileservice.management.upload.remoting;
 
+import java.io.IOException;
 import java.io.InputStream;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -50,7 +52,7 @@
 import org.jboss.security.SecurityContext;
 import org.jboss.system.server.profileservice.repository.DefaultProfileDeploymentFactory;
 import org.jboss.system.server.profileservice.repository.MainDeployerAdapter;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A remoting StreamInvocationHandler installed as the profile service subsystem
@@ -290,10 +292,20 @@
       
       // FIXME make deployment visible to management view
       VirtualFile vf = deploymentRepository.getDeploymentContent(repositoryName);
-      ProfileDeployment deployment = createDeployment(vf);
-      deploymentRepository.addDeployment(deployment.getName(), deployment);
-      deploymentRepository.lockDeploymentContent(deployment.getName());
       
+      // FIXME 
+      ProfileKey key = deploymentTarget.getProfile();
+      String profileName = key.getName();
+      String deploymentName = createDeploymentName(vf);
+      // Don't try to re-mount
+      if(deploymentRepository.getDeploymentNames().contains(deploymentName) == false)
+      {
+         ProfileDeployment deployment = createDeployment(profileName, deploymentName, vf);
+         // Add deployment
+         deploymentRepository.addDeployment(deployment.getName(), deployment);         
+      }
+      deploymentRepository.lockDeploymentContent(deploymentName);
+      
       log.info("End handle stream, repositoryName: " + repositoryName);
       // Return the repository names
       String[] rnames = {repositoryName};
@@ -417,14 +429,20 @@
     * @param file the root file
     * @return the deployment
     */
-   protected ProfileDeployment createDeployment(VirtualFile file)
+   protected ProfileDeployment createDeployment(String profileName, String deploymentName, VirtualFile file) throws IOException
    {
       if (file == null)
          throw new IllegalArgumentException("Null file");
       
-      return deploymentFactory.createProfileDeployment(file);
+      return deploymentFactory.createProfileDeployment(profileName, deploymentName, file);
    }
    
+   @SuppressWarnings("static-access")
+   protected String createDeploymentName(VirtualFile vf) throws URISyntaxException
+   {
+      return deploymentFactory.createDeploymentName(vf);
+   }
+   
    private void establishSecurityContext(InvocationRequest invocation) throws Exception
    { 
       SecurityContext newSC = SecurityActions.createAndSetSecurityContext(securityDomain);  

Modified: trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/DeployHandler.java
===================================================================
--- trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/DeployHandler.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/profileservice/src/main/java/org/jboss/profileservice/management/upload/remoting/DeployHandler.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -36,8 +36,8 @@
 import org.jboss.profileservice.spi.MutableProfile;
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.ProfileService;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A profile service deploy subsystem handling transient deployments. 
@@ -105,10 +105,11 @@
       log.info("Begin distribute, content url: " + contentURL);
 
       // Create the virtual file
-      VirtualFile vf = VFS.getRoot(contentURL);
+      VirtualFile vf = VFS.getChild(contentURL);
      
       // FIXME make deployment visible to management view
-      ProfileDeployment deployment = createDeployment(vf);
+      String deploymentName = createDeploymentName(vf);
+      ProfileDeployment deployment = createDeployment(AbstractTransientProfileManager.TRANSIENT_PROFILE_NAME, deploymentName, vf);
       this.transientProfile.addDeployment(deployment);
 
       String name = deployment.getName();
@@ -193,7 +194,10 @@
             {
                try
                {
-                  repositoryNames.add(vf.toURI().toString());
+                  String repositoryName = vf.toURI().toString();
+                  if(repositoryName.endsWith("/")) 
+                     repositoryName = repositoryName.substring(0, repositoryName.length() -1);
+                  repositoryNames.add(repositoryName);
                }
                catch(Exception ignored) { }
             }

Modified: trunk/security/src/main/java/org/jboss/security/deployers/AclConfigParsingDeployer.java
===================================================================
--- trunk/security/src/main/java/org/jboss/security/deployers/AclConfigParsingDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/security/src/main/java/org/jboss/security/deployers/AclConfigParsingDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -24,7 +24,7 @@
 import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
 import org.jboss.security.acl.config.ACLConfiguration;
 import org.jboss.security.acl.config.ACLConfigurationFactory;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Parsing Deployer for ACL jboss-acl-policy.xml that 

Modified: trunk/security/src/main/java/org/jboss/security/deployers/JAXBElementParsingDeployer.java
===================================================================
--- trunk/security/src/main/java/org/jboss/security/deployers/JAXBElementParsingDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/security/src/main/java/org/jboss/security/deployers/JAXBElementParsingDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -29,7 +29,7 @@
 
 import org.jboss.deployers.vfs.spi.deployer.JAXBDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit; 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.xml.sax.InputSource;
 
 /**

Modified: trunk/server/pom.xml
===================================================================
--- trunk/server/pom.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/pom.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -283,6 +283,11 @@
     </dependency>
 
     <dependency>
+      <groupId>org.jboss.jpa</groupId>
+      <artifactId>jboss-jpa-vfs3</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>org.jboss.reloaded</groupId>
       <artifactId>jboss-reloaded-naming</artifactId>
       <scope>runtime</scope>

Modified: trunk/server/src/etc/conf/all/bootstrap/deployers.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap/deployers.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/conf/all/bootstrap/deployers.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -125,7 +125,7 @@
           <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
              <!-- A filter to exclude some obvious non-subdeployments -->
              <property name="filter">
-                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                <bean name="JARFilter" class="org.jboss.vfs.util.SuffixesExcludeFilter">
                    <constructor><parameter>
                       <list elementClass="java.lang.String">
                          <!-- Exclude class files as subdeployments -->
@@ -167,6 +167,7 @@
       <property name="suffix">-aop.xml</property>
    </bean>
    <bean name="AOPAnnotationMetaDataParserDeployer" class="org.jboss.aop.asintegration.jboss5.AOPAnnotationMetaDataParserDeployer">
+      <constructor><parameter>0</parameter></constructor>
    </bean>
    <bean name="AOPClassLoaderDeployer" class="org.jboss.aop.asintegration.jboss5.AOPClassLoaderDeployer">
       <property name="aspectManager"><inject bean="AspectManager" property="aspectManager"/></property>
@@ -250,7 +251,6 @@
          <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true"/>
       </property>
    </bean>
-   <bean name="InMemoryClassesDeployer" class="org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer"/>
    <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer"/>
    <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
       <property name="classLoading"><inject bean="ClassLoading"/></property>

Modified: trunk/server/src/etc/conf/all/bootstrap/profile.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap/profile.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/conf/all/bootstrap/profile.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -83,7 +83,7 @@
   </bean>
 
   <!-- This just checks metadata locations -->
-  <bean name="MetaDataStructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
+  <bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
     <constructor>
       <parameter><inject bean="MainDeployer" /></parameter>
     </constructor>
@@ -91,11 +91,8 @@
     <property name="filter"><inject bean="FileStructure"/></property>
   </bean>
 
-  <!-- Synchs modifed files -->
-  <bean name="SynchAdapter" class="org.jboss.deployers.vfs.spi.structure.modified.OverrideSynchAdapter"/>
-
   <!-- We just visit wars, but exclude classes, lib, dev dirs -->
-  <bean name="WebVisitorAttributes" class="org.jboss.virtual.plugins.vfs.helpers.IncludeExcludeVisitorAttributes">
+  <bean name="WebVisitorAttributes" class="org.jboss.vfs.util.IncludeExcludeVisitorAttributes">
     <constructor>
       <parameter>
         <set>
@@ -112,15 +109,6 @@
     </constructor>
   </bean>
 
-  <bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.SynchWrapperModificationChecker">
-    <constructor>
-      <parameter><inject bean="MetaDataStructureModificationChecker"/></parameter>
-      <parameter><inject bean="SynchAdapter"/></parameter>
-    </constructor>
-    <property name="originalAttributes"><inject bean="WebVisitorAttributes"/></property>
-    <property name="tempAttributes"><inject bean="WebVisitorAttributes"/></property>
-  </bean>
-
 	<bean name="BasicProfileFactory" class="org.jboss.system.server.profileservice.repository.BasicProfileFactory">
 		<property name="profileRepository"><inject bean="ProfileRepositoryFactory" /></property>
 	</bean>
@@ -203,7 +191,7 @@
    </bean>
 
 	<!-- A filter for excluding files from the scanner -->
-	<bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+	<bean name="DeploymentFilter" class="org.jboss.vfs.util.ExtensibleFilter">
 		<!-- Files starting with theses strings are ignored -->
 		<property name="prefixes">#,%,\,,.,_$</property>
 		<!-- Files ending with theses strings are ignored -->

Modified: trunk/server/src/etc/conf/all/bootstrap/vfs.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap/vfs.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/conf/all/bootstrap/vfs.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -4,51 +4,6 @@
 -->
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
-  <bean name="VFSCache">
-    <constructor factoryClass="org.jboss.virtual.spi.cache.VFSCacheFactory" factoryMethod="getInstance">
-      <!-- Use the CombinedVFSCache implementation -->
-      <parameter>org.jboss.virtual.plugins.cache.CombinedVFSCache</parameter>
-    </constructor>
-    <start ignored="true"/>
-    <property name="permanentRoots">
-      <map keyClass="java.net.URL" valueClass="org.jboss.virtual.spi.ExceptionHandler">
-        <entry>
-          <key>${jboss.lib.url}</key>
-          <value><null/></value>
-        </entry>
-        <entry>
-          <key>${jboss.common.lib.url}</key>
-          <value><inject bean="VfsNamesExceptionHandler"/></value>
-        </entry>
-        <entry>
-          <key>${jboss.common.base.url}/deploy</key>
-          <value><inject bean="VfsNamesExceptionHandler"/></value>
-        </entry>
-        <entry>
-          <key>${jboss.server.lib.url}</key>
-          <value><inject bean="VfsNamesExceptionHandler"/></value>
-        </entry>
-        <entry>
-          <key>${jboss.server.home.url}deploy</key>
-          <value><inject bean="VfsNamesExceptionHandler"/></value>
-        </entry>
-	<!-- Comes into play only for "all" server configuration " -->
-	<entry>
-		<key>${jboss.server.home.url}farm</key>
-		<value><inject bean="VfsNamesExceptionHandler"/></value>
-	</entry>
 
-      </map>
-    </property>
-    <property name="realCache">
-      <bean class="org.jboss.virtual.plugins.cache.IterableTimedVFSCache"/>
-    </property>
-  </bean>
 
-  <bean name="VfsNamesExceptionHandler" class="org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler">
-    <constructor>
-      <parameter class="java.lang.String">sqljdbc.jar</parameter>
-    </constructor>
-  </bean>
-
 </deployment>

Modified: trunk/server/src/etc/conf/default/bootstrap/profile.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap/profile.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/conf/default/bootstrap/profile.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -74,7 +74,7 @@
   </bean>
 
   <!-- This just checks metadata locations -->
-  <bean name="MetaDataStructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
+  <bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
     <constructor>
       <parameter><inject bean="MainDeployer" /></parameter>
     </constructor>
@@ -83,11 +83,8 @@
     <property name="filter"><inject bean="FileStructure"/></property>
   </bean>
 
-  <!-- Synchs modifed files -->
-  <bean name="SynchAdapter" class="org.jboss.deployers.vfs.spi.structure.modified.OverrideSynchAdapter"/>
-
   <!-- We just visit wars, but exclude classes, lib, dev dirs -->
-  <bean name="WebVisitorAttributes" class="org.jboss.virtual.plugins.vfs.helpers.IncludeExcludeVisitorAttributes">
+  <bean name="WebVisitorAttributes" class="org.jboss.vfs.util.IncludeExcludeVisitorAttributes">
     <constructor>
       <parameter>
         <set>
@@ -104,15 +101,6 @@
     </constructor>
   </bean>
 
-  <bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.SynchWrapperModificationChecker">
-    <constructor>
-      <parameter><inject bean="MetaDataStructureModificationChecker"/></parameter>
-      <parameter><inject bean="SynchAdapter"/></parameter>
-    </constructor>
-    <property name="originalAttributes"><inject bean="WebVisitorAttributes"/></property>
-    <property name="tempAttributes"><inject bean="WebVisitorAttributes"/></property>
-  </bean>
-
 	<bean name="BasicProfileFactory" class="org.jboss.system.server.profileservice.repository.BasicProfileFactory">
 		<property name="profileRepository"><inject bean="ProfileRepositoryFactory" /></property>
 	</bean>
@@ -165,7 +153,7 @@
    </bean>
    
 	<!-- A filter for excluding files from the scanner -->
-	<bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+	<bean name="DeploymentFilter" class="org.jboss.vfs.util.ExtensibleFilter">
 		<!-- Files starting with theses strings are ignored -->
 		<property name="prefixes">#,%,\,,.,_$</property>
 		<!-- Files ending with theses strings are ignored -->

Modified: trunk/server/src/etc/deploy/jboss-logging.xml
===================================================================
--- trunk/server/src/etc/deploy/jboss-logging.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/deploy/jboss-logging.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -419,7 +419,7 @@
      <level name="INFO" />
    </logger>
 
-   <logger category="org.jboss.virtual">
+   <logger category="org.jboss.vfs">
      <level name="INFO" />
    </logger>
 
@@ -654,9 +654,9 @@
       </handlers>
    </logger>
    -->
-
-   <!-- This is a temporary workaround for https://jira.jboss.org/jira/browse/EMBJOPR-280 and
-        should be removed once that bug if fixed in the bundled admin-console war. -->
+
+   <!-- This is a temporary workaround for https://jira.jboss.org/jira/browse/EMBJOPR-280 and
+        should be removed once that bug if fixed in the bundled admin-console war. -->
    <logger category="org.rhq.plugins.jbossas5.ApplicationServerComponent">
       <level name="FATAL"/>
    </logger>

Modified: trunk/server/src/etc/deploy/vfs-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deploy/vfs-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/deploy/vfs-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -1,14 +1,5 @@
 <?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>
 
-  <bean name="VFSCacheOperations" class="org.jboss.deployment.vfs.VFSCacheOperations">
-    <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.vfs:service=VFSCacheOperations", exposedInterface=org.jboss.deployment.vfs.VFSCacheOperationsMBean.class, registerDirectly=true)</annotation>
-    <start ignored="true"/>
-    <stop ignored="true"/>
-  </bean>
-
 </deployment>

Modified: trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -23,7 +23,7 @@
   <bean name="JBossCustomDeployDUFilter" class="org.jboss.deployers.vfs.spi.structure.helpers.VirtualFileDeploymentUnitFilter">
     <constructor>
       <parameter>
-        <bean class="org.jboss.virtual.plugins.vfs.helpers.FileNameVirtualFileFilter">
+        <bean class="org.jboss.vfs.util.FileNameVirtualFileFilter">
           <constructor>
             <parameter>
               <map keyClass="java.lang.String" valueClass="java.util.Set">

Modified: trunk/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -71,7 +71,7 @@
 import org.jboss.mcann.AnnotationRepository;
 import org.jboss.mcann.Element;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A POST_CLASSLOADER deployer which generates metadata from annotations.

Modified: trunk/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -22,7 +22,6 @@
 package org.jboss.deployment;
 
 import java.io.IOException;
-import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.HashMap;
@@ -33,10 +32,10 @@
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * A VirtualFileVisitor that traverses unit root and determines the
@@ -95,17 +94,10 @@
 
    public void visit(VirtualFile file)
    {
-      try
+      if(file.isFile())
       {
-         if(file.isLeaf())
-         {
-            accepts(file);
-         }
+         accepts(file);
       }
-      catch (IOException e)
-      {
-         throw new Error("Error visiting " + file, e);
-      }
    }
 
    public boolean accepts(VirtualFile file)

Modified: trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -48,8 +48,8 @@
 import org.jboss.metadata.web.spec.Web25MetaData;
 import org.jboss.metadata.web.spec.Web30MetaData;
 import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A POST_CLASSLOADER deployer which generates metadata from
@@ -169,15 +169,7 @@
       }
       
       VirtualFile root = unit.getRoot();
-      boolean isLeaf = true;
-      try
-      {
-         isLeaf = root.isLeaf();
-      }
-      catch(IOException ignore)
-      {
-      }
-      if(isLeaf == true)
+      if(root.isLeaf())
          return;
 
       List<VirtualFile> classpath = unit.getClassPath();
@@ -343,16 +335,9 @@
          return null;
       }
 
-      try
-      {
-         Manifest mf = VFSUtils.readManifest(file);
-         Attributes attrs = mf.getMainAttributes();
-         return attrs.getValue(Attributes.Name.MAIN_CLASS);
-      }
-      finally
-      {
-         file.close();
-      }
+      Manifest mf = VFSUtils.readManifest(file);
+      Attributes attrs = mf.getMainAttributes();
+      return attrs.getValue(Attributes.Name.MAIN_CLASS);
    }
 }
 

Modified: trunk/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -32,7 +32,7 @@
 import org.jboss.metadata.ear.spec.ModulesMetaData;
 import org.jboss.metadata.ejb.spec.EjbJarMetaData;
 import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 
 /**

Modified: trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -41,8 +41,8 @@
 import org.jboss.metadata.ear.spec.ModuleMetaData;
 import org.jboss.metadata.ear.spec.ModulesMetaData;
 import org.jboss.metadata.ear.spec.WebModuleMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * An implicit application.xml type of deployer. This deployer runs if

Modified: trunk/server/src/main/java/org/jboss/deployment/EARStructure.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/EARStructure.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/EARStructure.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -30,7 +30,7 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.structure.spi.helpers.RelativeDeploymentContextComparator;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.metadata.ear.jboss.JBossAppMetaData;
 import org.jboss.metadata.ear.jboss.ServiceModuleMetaData;
@@ -43,10 +43,11 @@
 import org.jboss.metadata.ear.spec.ModuleMetaData;
 import org.jboss.metadata.ear.spec.ModulesMetaData;
 import org.jboss.metadata.ear.spec.WebModuleMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.SuffixMatchFilter;
+import org.jboss.vfs.util.automount.Automounter;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
@@ -60,7 +61,7 @@
  * @author adrian at jboss.org
  * @version $Revision$
  */
-public class EARStructure extends AbstractVFSStructureDeployer
+public class EARStructure extends AbstractVFSArchiveStructureDeployer
 {
    /**
     * The default ear/lib filter
@@ -129,8 +130,14 @@
    {
       this.resolver = resolver;
    }
+   
+   @Override
+   protected boolean hasValidSuffix(String name)
+   {
+      return name.toLowerCase().endsWith(".ear");
+   }
 
-   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+   public boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
    {
       ContextInfo context;
       boolean valid;
@@ -138,7 +145,7 @@
       VirtualFile file = structureContext.getFile();
       try
       {
-         if (file.isLeaf() == true || file.getName().endsWith(".ear") == false)
+         if (hasValidName(file) == false)
             return false;
 
          context = createContext(structureContext, "META-INF");
@@ -199,36 +206,28 @@
             try
             {
                lib = file.getChild(libDir);
-               if (lib != null)
+               if (lib.exists())
                {
                   if(trace)
                      log.trace("Found ear lib directory: "+lib);
                   List<VirtualFile> archives = lib.getChildren(earLibFilter);
                   for (VirtualFile archive : archives)
                   {
+                     Automounter.mount(file, archive);
                      addClassPath(structureContext, archive, true, true, context);
-                     try
+                     // add any jars with persistence.xml as a deployment
+                     if (archive.getChild("META-INF/persistence.xml").exists())
                      {
-                        // add any jars with persistence.xml as a deployment
-                        if (archive.getChild("META-INF/persistence.xml") != null)
+                        log.trace(archive.getName() + " in ear lib directory has persistence units");
+                        if (structureContext.determineChildStructure(archive) == false)
                         {
-                           log.trace(archive.getName() + " in ear lib directory has persistence units");
-                           if (structureContext.determineChildStructure(archive) == false)
-                           {
-                              throw new RuntimeException(archive.getName()
-                                    + " in lib directory has persistence.xml but is not a recognized deployment, .ear: "
-                                    + file.getName());
-                           }
+                           throw new RuntimeException(archive.getName()
+                                 + " in lib directory has persistence.xml but is not a recognized deployment, .ear: "
+                                 + file.getName());
                         }
-                        else if (trace)
-                           log.trace(archive.getPathName() + " does not contain META-INF/persistence.xml");
-
                      }
-                     catch(IOException e)
-                     {
-                        // TODO - should we throw this fwd?
-                        log.warn("Exception searching for META-INF/persistence.xml in " + archive.getPathName() + ", " + e);
-                     }
+                     else if (trace)
+                        log.trace(archive.getPathName() + " does not contain META-INF/persistence.xml");
                   }
                }
                else if (trace)
@@ -266,25 +265,19 @@
                   if (log.isTraceEnabled())
                      log.trace("Checking application.xml module: " + fileName);
 
-                  try
+                  VirtualFile module = file.getChild(fileName);
+                  if (module.exists() == false)
                   {
-                     VirtualFile module = file.getChild(fileName);
-                     if (module == null)
-                     {
-                        throw new RuntimeException(fileName + " module listed in application.xml does not exist within .ear " + file.toURI());
-                     }
-                     // Ask the deployers to analyze this
-                     if(structureContext.determineChildStructure(module) == false)
-                     {
-                        throw new RuntimeException(fileName
-                              + " module listed in application.xml is not a recognized deployment, .ear: "
-                              + file.getName());
-                     }
+                     throw new RuntimeException(fileName + " module listed in application.xml does not exist within .ear " + file.toURI());
 
+
                   }
-                  catch (IOException e)
+                  // Ask the deployers to analyze this
+                  if(structureContext.determineChildStructure(module) == false)
                   {
-                     throw new RuntimeException("Exception looking for " + fileName + " module listed in application.xml, .ear " + file.getName(), e);
+                     throw new RuntimeException(fileName
+                           + " module listed in application.xml is not a recognized deployment, .ear: "
+                           + file.getName());
                   }
                }
             }
@@ -442,14 +435,8 @@
    private VirtualFile getMetaDataFile(VirtualFile file, String path)
    {
       VirtualFile metaFile = null;
-      try
-      {
-         metaFile = file.getChild(path);
-      }
-      catch(IOException ignored)
-      {
-      }
-      return metaFile;
+      metaFile = file.getChild(path);
+      return metaFile.exists() ? metaFile : null;
    }
 
    public void setIncludeEarRootInClasspath(boolean includeEarRootInClasspath)

Modified: trunk/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -30,8 +30,8 @@
 import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.metadata.ear.jboss.JBossAppMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Exclude ear's lib from AnnotationRrepositoryDeployer / OptAnnotationMetaDataDeployer processing.
@@ -94,7 +94,7 @@
       {
          try
          {
-            VirtualFile file = VFS.getRoot(rc.getUrl());
+            VirtualFile file = VFS.getChild(rc.getUrl());
             while (file != null)
             {
                if (url.equals(file.toURL())) // our parent is the lib

Modified: trunk/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -30,8 +30,8 @@
 import org.jboss.metadata.ApplicationMetaData;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.ejb.spec.EjbJarMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * An ObjectModelFactoryDeployer for translating jboss.xml descriptors into
@@ -138,7 +138,7 @@
                standardJBossXmlPath = new URL(configUrl, "standardjboss.xml");
             }
 
-            VirtualFile stdJBoss = VFS.getRoot(standardJBossXmlPath);
+            VirtualFile stdJBoss = VFS.getChild(standardJBossXmlPath);
             if (stdJBoss == null && ignoreMissingStandardJBossXml == false)
             {
                throw new DeploymentException("standardjboss.xml not found in config dir: " + standardJBossXmlPath);

Modified: trunk/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -46,7 +46,7 @@
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.ejb.spec.EjbJarMetaData;
 import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A POST_CLASSLOADER deployer which generates metadata from annotations.

Modified: trunk/server/src/main/java/org/jboss/deployment/PUHackDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/PUHackDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/PUHackDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -44,8 +44,8 @@
 import org.jboss.metadata.spi.MetaData;
 import org.jboss.metadata.spi.MutableMetaData;
 import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Hack to work around PersistenceUnitDeployment usage of DeploymentUnit::getMetaDataFile

Modified: trunk/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -25,7 +25,7 @@
 import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.metadata.web.spec.TldMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * An ObjectModelFactoryDeployer for translating tag library descriptors into

Modified: trunk/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -29,7 +29,7 @@
 import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.metadata.web.spec.WebFragmentMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * An ObjectModelFactoryDeployer for translating web-fragment.xml descriptors into

Modified: trunk/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java
===================================================================
--- trunk/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -26,7 +26,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.metadata.XmlFileLoader;
 import org.jboss.ejb.Container;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Element;
 
 /**

Modified: trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -22,7 +22,9 @@
 package org.jboss.web.deployers;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.Method;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -67,9 +69,11 @@
 import org.jboss.system.metadata.ServiceInjectionValueMetaData;
 import org.jboss.system.metadata.ServiceMetaData;
 import org.jboss.util.file.Files;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 import org.jboss.web.WebApplication;
 
 /** A template pattern class for web container integration into JBoss. This class
@@ -364,53 +368,43 @@
 
             VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
             VirtualFile root = vfsUnit.getRoot();
-            VirtualFile unjared = VFSUtils.unjar(root);
-            // file was not unjared yet
-            if (root != unjared)
+            expWarUrl = getExplodedWarUrl(root);
+
+            // Map
+            String warPathName = root.getPathName();
+            if (warPathName.endsWith("/") == false)
+               warPathName += "/";
+            List<VirtualFile> classpathVFs = vfsUnit.getClassPath();
+            if (classpathVFs != null)
             {
-               // get the real unjared url
-               expWarUrl = VFSUtils.getRealURL(unjared);
-
-               // Map
-               String warPathName = root.getPathName();
-               if (warPathName.endsWith("/") == false)
-                  warPathName += "/";
-               List<VirtualFile> classpathVFs = vfsUnit.getClassPath();
-               if (classpathVFs != null)
+               List<URL> classpath = new ArrayList<URL>();
+               for (VirtualFile vf : classpathVFs)
                {
-                  List<URL> classpath = new ArrayList<URL>();
-                  for (VirtualFile vf : classpathVFs)
+                  try
                   {
-                     try
+                     String path = vf.getPathName();
+                     if (path.startsWith(warPathName))
                      {
-                        String path = vf.getPathName();
-                        if (path.startsWith(warPathName))
-                        {
-                           path = path.substring(warPathName.length());
-                           URL pathURL = new URL(expWarUrl, path);
-                           classpath.add(pathURL);
-                        }
-                        else
-                        {
-                           log.debug("Ignoring path element: " + vf);
-                        }
+                        path = path.substring(warPathName.length());
+                        URL pathURL = new URL(expWarUrl, path);
+                        classpath.add(pathURL);
                      }
-                     catch (Exception e)
+                     else
                      {
-                        log.debug("Ignoring path element: " + vf, e);
+                        log.debug("Ignoring path element: " + vf);
                      }
                   }
-                  unit.addAttachment("org.jboss.web.expandedWarClasspath", classpath);
+                  catch (Exception e)
+                  {
+                     log.debug("Ignoring path element: " + vf, e);
+                  }
                }
-
-               // Indicate that an expanded URL exists
-               unit.addAttachment("org.jboss.web.expandedWarURL", expWarUrl, URL.class);
+               unit.addAttachment("org.jboss.web.expandedWarClasspath", classpath);
             }
-            else
-            {
-               expWarUrl = VFSUtils.getRealURL(root);
-            }
 
+            // Indicate that an expanded URL exists
+            unit.addAttachment("org.jboss.web.expandedWarURL", expWarUrl, URL.class);
+
             // Resolve any ear relative alt-dd path to an expWarUrl/WEB-INF/alt-dd.xml file
             String altDDPath = metaData.getAlternativeDD();
             if (altDDPath != null)
@@ -430,11 +424,11 @@
                      altDD = topUnit.getFile(altDDPath);
                      if (altDD == null)
                         throw new DeploymentException("Unable to resolve " + altDDPath + " as a deployment path");
-                     File webInf = new File(expWarUrl.toURI());
-                     File altDDFile = new File(webInf, "WEB-INF/" + altDD.getName());
+                     
+                     VirtualFile altDDFile = root.getChild("WEB-INF/" + altDD.getName());
                      log.debug("Copying the altDD to: " + altDDFile);
-                     Files.copy(altDD.toURL(), altDDFile);
-                     metaData.setAlternativeDD(altDDFile.getAbsolutePath());
+                     VFSUtils.writeFile(altDDFile, altDD.openStream());
+                     metaData.setAlternativeDD(altDDFile.getPathName());
                   }
                }
             }
@@ -478,8 +472,7 @@
          if (warURL != null)
          {
             // use vfs to cleanup/delete - since we created it with vfs
-            VirtualFile file = VFS.getRoot(warURL);
-            file.cleanup(); // it's temp, it will be deleted as well
+            VirtualFile file = VFS.getChild(warURL);
          }
       }
       catch (Exception e)
@@ -750,4 +743,37 @@
       mo.getProperty("contextRoot").setValue(SimpleValueSupport.wrap(meta.getContextRoot()));
       managedObjects.put("ContextMO", mo);
    }
+   
+   /**
+    * This method is a hack to make sure the WAR is fully exploded.  Currently this is only needed
+    * for WARs that come through the DeclaredStructure deployer.  This should be removed when the 
+    * DeclaredStructure deployer correctly support exploding WARs. 
+    */
+   private URL getExplodedWarUrl(VirtualFile virtualFile) throws MalformedURLException, IOException {
+      if(virtualFile.isDirectory()) 
+      {
+         VirtualFileVisitor visitor = new VirtualFileVisitor() 
+         {
+            public void visit(VirtualFile virtualFile)
+            {
+               try 
+               {
+                  virtualFile.getPhysicalFile();
+               }
+               catch (IOException e) 
+               {
+                  throw new RuntimeException("Failed to force explosion of VirtualFile: " + virtualFile, e);
+               }
+            }
+            
+            public VisitorAttributes getAttributes()
+            {
+               return VisitorAttributes.RECURSE_LEAVES_ONLY;
+            }
+         };
+         virtualFile.visit(visitor);
+         return virtualFile.getPhysicalFile().toURI().toURL();
+      }
+      return virtualFile.toURL();
+   }
 }

Modified: trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -69,7 +69,7 @@
 import org.jboss.security.ISecurityManagement;
 import org.jboss.security.SecurityConstants;
 import org.jboss.security.authorization.PolicyRegistration;
-import org.jboss.virtual.VFSUtils;
+import org.jboss.vfs.VFSUtils;
 import org.jboss.web.WebApplication;
 import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 import org.omg.CORBA.ORB;
@@ -435,7 +435,7 @@
          if (warUrl == null && unit instanceof VFSDeploymentUnit)
          {
             VFSDeploymentUnit vdu = VFSDeploymentUnit.class.cast(unit);
-            warUrl = VFSUtils.getRealURL(vdu.getRoot());
+            warUrl = VFSUtils.getPhysicalURL(vdu.getRoot());
          }
 
          // Dynamic WebMetaData deployments might not provide an URL

Modified: trunk/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -33,10 +33,10 @@
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * A VirtualFileVisitor that traverses unit root and determines the
@@ -91,17 +91,10 @@
 
    public void visit(VirtualFile file)
    {
-      try
+      if(file.isFile())
       {
-         if(file.isLeaf())
-         {
-            accepts(file);
-         }
+         accepts(file);
       }
-      catch (IOException e)
-      {
-         throw new Error("Error visiting " + file, e);
-      }
    }
 
    @SuppressWarnings("unchecked")

Modified: trunk/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -49,7 +49,7 @@
 import org.jboss.metadata.web.spec.WebCommonMetaData;
 import org.jboss.metadata.web.spec.WebFragmentMetaData;
 import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A deployer that merges annotation metadata, xml metadata, and jboss metadata
@@ -138,29 +138,23 @@
          webInfLib = vfsUnit.getFile("WEB-INF/lib");
          if (webInfLib != null)
          {
-            try
+            List<VirtualFile> jars = webInfLib.getChildren();
+            for (VirtualFile jar : jars)
             {
-               List<VirtualFile> jars = webInfLib.getChildren();
-               for (VirtualFile jar : jars)
+               jarsSet.add(jar.getName());
+               // Find overlays
+               VirtualFile overlay = jar.getChild("META-INF/resources");
+               if (overlay.exists())
                {
-                  jarsSet.add(jar.getName());
-                  // Find overlays
-                  VirtualFile overlay = jar.getChild("META-INF/resources");
-                  if (overlay != null)
-                  {
-                     overlays.add(overlay);
-                  }
-                  // Find ServletContainerInitializer services
-                  VirtualFile sci = jar.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
-                  if (sci != null)
-                  {
-                     scis.put(jar.getName(), sci);
-                  }
+                  overlays.add(overlay);
                }
+               // Find ServletContainerInitializer services
+               VirtualFile sci = jar.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
+               if (sci.exists())
+               {
+                  scis.put(jar.getName(), sci);
+               }
             }
-            catch (IOException e)
-            {
-            }
          }
 
          if (!isComplete)

Modified: trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -25,6 +25,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -44,8 +45,8 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
 import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A deployer that processes ServletContainerInitializer.
@@ -108,9 +109,9 @@
          {
             try
             {
-               VFS vfs = VFS.getVFS(jarURL);
-               VirtualFile sci = vfs.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
-               if (sci != null)
+               VirtualFile virtualFile = VFS.getChild(jarURL);
+               VirtualFile sci = virtualFile.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
+               if (sci.exists())
                {
                   ServletContainerInitializer service = loadSci(unit, sci, jarURL.getPath(), false);
                   if (service != null)
@@ -119,7 +120,7 @@
                   }
                }
             }
-            catch (IOException e)
+            catch (URISyntaxException e)
             {
                DeploymentException.rethrowAsDeploymentException("Deployment error processing SCI for JAR: " + jarURL, e);
             }

Modified: trunk/server/src/main/java/org/jboss/web/deployers/WARStructure.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/WARStructure.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/WARStructure.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -27,12 +27,14 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.MetaDataType;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.SuffixMatchFilter;
+import org.jboss.vfs.util.automount.Automounter;
+import org.jboss.vfs.util.automount.MountOption;
 
 /**
  * WARStructure.
@@ -41,7 +43,7 @@
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision$
  */
-public class WARStructure extends AbstractVFSStructureDeployer
+public class WARStructure extends AbstractVFSArchiveStructureDeployer
 {
    /** The default filter which allows jars/jar directories */
    public static final VirtualFileFilter DEFAULT_WEB_INF_LIB_FILTER = new SuffixMatchFilter(".jar", VisitorAttributes.DEFAULT);
@@ -117,7 +119,7 @@
       this.includeWebInfInClasspath = includeWebInfInClasspath;
    }
 
-   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+   public boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
    {
       ContextInfo context = null;
       VirtualFile file = structureContext.getFile();
@@ -127,133 +129,117 @@
 
          // the WEB-INF
          VirtualFile webinf;
-
-         if (isLeaf(file) == false)
+         
+         // We require either a WEB-INF or the name ends in .war
+         if (hasValidSuffix(file.getName()) == false)
          {
-            // We require either a WEB-INF or the name ends in .war
-            if (file.getName().endsWith(".war") == false)
-            {
-               try
-               {
-                  webinf = file.getChild("WEB-INF");
-                  if (webinf != null)
-                  {
-                     if (trace)
-                        log.trace("... ok - directory has a WEB-INF subdirectory");
-                  }
-                  else
-                  {
-                     if (trace)
-                        log.trace("... no - doesn't look like a war and no WEB-INF subdirectory.");
-                     return false;
-                  }
-               }
-               catch (IOException e)
-               {
-                  log.warn("Exception while checking if file is a war: " + e);
-                  return false;
-               }
-            }
-            else if (trace)
-            {
-               log.trace("... ok - name ends in .war.");
-            }
+           webinf = file.getChild("WEB-INF");
+           if (webinf.exists())
+           {
+              if (trace)
+                 log.trace("... ok - directory has a WEB-INF subdirectory");
+           }
+           else
+           {
+              if (trace)
+                 log.trace("... no - doesn't look like a war and no WEB-INF subdirectory.");
+              return false;
+           }
+         }
+         else if (trace)
+         {
+            log.trace("... ok - name ends in .war.");
+         } 
 
-            // Check for a META-INF for metadata
-            // FIXME: This is not spec legal, descriptors could be loaded from this location
-            String[] metaDataLocations = new String[]{"WEB-INF", "WEB-INF/classes/META-INF"};
-            // Create a context for this war file and all its metadata locations
-            context = createContext(structureContext, metaDataLocations);
+         // Check for a META-INF for metadata
+         // FIXME: This is not spec legal, descriptors could be loaded from this location
+         String[] metaDataLocations = new String[]{"WEB-INF", "WEB-INF/classes/META-INF"};
+         // Create a context for this war file and all its metadata locations
+         context = createContext(structureContext, metaDataLocations);
 
-            // Add all children as locations for TLDs (except classes and lib), recursively
-            webinf = file.getChild("WEB-INF");
-            if (webinf != null)
+         // Add all children as locations for TLDs (except classes and lib), recursively
+         webinf = file.getChild("WEB-INF");
+         if (webinf.exists())
+         {
+            List<VirtualFile> children = webinf.getChildren();
+            for (VirtualFile child : children)
             {
-               List<VirtualFile> children = webinf.getChildren();
-               for (VirtualFile child : children)
+               if (!isLeaf(child) && (!"lib".equals(child.getName())) && (!"classes".equals(child.getName())))
                {
-                  if (!isLeaf(child) && (!"lib".equals(child.getName())) && (!"classes".equals(child.getName())))
-                  {
-                     addMetaDataPath(structureContext, context, "WEB-INF/" + child.getName(), MetaDataType.ALTERNATIVE);
-                     addPathsRecursively(structureContext, context, child, "WEB-INF/" + child.getName());
-                  }
+                  addMetaDataPath(structureContext, context, "WEB-INF/" + child.getName(), MetaDataType.ALTERNATIVE);
+                  addPathsRecursively(structureContext, context, child, "WEB-INF/" + child.getName());
                }
             }
+         }
 
-            // Check for jars in WEB-INF/lib
-            List<VirtualFile> archives = null;
-            try
+         // Check for jars in WEB-INF/lib
+         List<VirtualFile> archives = null;
+         try
+         {
+            VirtualFile webinfLib = file.getChild("WEB-INF/lib");
+            if (webinfLib.exists())
             {
-               VirtualFile webinfLib = file.getChild("WEB-INF/lib");
-               if (webinfLib != null)
+               archives = webinfLib.getChildren(webInfLibFilter);
+               // Add the jars' META-INF for metadata
+               for (VirtualFile jar : archives)
                {
-                  archives = webinfLib.getChildren(webInfLibFilter);
-                  // Add the jars' META-INF for metadata
-                  for (VirtualFile jar : archives)
+                  Automounter.mount(file, jar);
+                  // either same as plain lib filter, null or accepts the jar
+                  if (webInfLibMetaDataFilter == null || webInfLibMetaDataFilter == webInfLibFilter || webInfLibMetaDataFilter.accepts(jar))
                   {
-                     // either same as plain lib filter, null or accepts the jar
-                     if (webInfLibMetaDataFilter == null || webInfLibMetaDataFilter == webInfLibFilter || webInfLibMetaDataFilter.accepts(jar))
+                     VirtualFile metaInf = jar.getChild("META-INF");
+                     if (metaInf.exists() && !isLeaf(metaInf))
                      {
-                        VirtualFile metaInf = jar.getChild("META-INF");
-                        if (metaInf != null && !isLeaf(metaInf))
+                        addMetaDataPath(structureContext, context, "WEB-INF/lib/" + jar.getName() + "/META-INF", MetaDataType.ALTERNATIVE);
+                        List<VirtualFile> children = metaInf.getChildren();
+                        for (VirtualFile child : children)
                         {
-                           addMetaDataPath(structureContext, context, "WEB-INF/lib/" + jar.getName() + "/META-INF", MetaDataType.ALTERNATIVE);
-                           List<VirtualFile> children = metaInf.getChildren();
-                           for (VirtualFile child : children)
+                           if (!isLeaf(child) && (!"resources".equals(child.getName())))
                            {
-                              if (!isLeaf(child) && (!"resources".equals(child.getName())))
-                              {
-                                 addMetaDataPath(structureContext, context, "WEB-INF/lib/" + jar.getName() + "/META-INF/" + child.getName(), MetaDataType.ALTERNATIVE);
-                                 addPathsRecursively(structureContext, context, child, "WEB-INF/lib/" + jar.getName() + "/META-INF/" + child.getName());
-                              }
+                              addMetaDataPath(structureContext, context, "WEB-INF/lib/" + jar.getName() + "/META-INF/" + child.getName(), MetaDataType.ALTERNATIVE);
+                              addPathsRecursively(structureContext, context, child, "WEB-INF/lib/" + jar.getName() + "/META-INF/" + child.getName());
                            }
                         }
                      }
                   }
                }
             }
-            catch (IOException e)
-            {
-               log.warn("Exception looking for WEB-INF/lib, " + file.getPathName() + ", " + e);
-            }
-            
-            // Add the war manifest classpath entries
-            addClassPath(structureContext, file, false, true, context);
+         }
+         catch (IOException e)
+         {
+            log.warn("Exception looking for WEB-INF/lib, " + file.getPathName() + ", " + e);
+         }
+         
+         // Add the war manifest classpath entries
+         addClassPath(structureContext, file, false, true, context);
 
-            // Check for WEB-INF/classes
-            VirtualFile classes = file.getChild("WEB-INF/classes");
-            // Add WEB-INF/classes if present
-            if (classes != null)
-               addClassPath(structureContext, classes, true, false, context);
-            else if (trace)
-               log.trace("No WEB-INF/classes for: " + file.getPathName());
+         // Check for WEB-INF/classes
+         VirtualFile classes = file.getChild("WEB-INF/classes");
+         // Add WEB-INF/classes if present
+         if (classes.exists())
+            addClassPath(structureContext, classes, true, false, context);
+         else if (trace)
+            log.trace("No WEB-INF/classes for: " + file.getPathName());
 
-            // and the top level jars in WEB-INF/lib
-            if (archives != null)
-            {
-               for (VirtualFile jar : archives)
-                  addClassPath(structureContext, jar, true, true, context);
-            }
-            else if (trace)
-            {
-               log.trace("No WEB-INF/lib for: " + file.getPathName());
-            }
-
-            // do we include WEB-INF in classpath
-            if (includeWebInfInClasspath && webinf != null)
-            {
-               addClassPath(structureContext, webinf, true, false, context);
-            }
-
-            // There are no subdeployments for wars
-            return true;
+         // and the top level jars in WEB-INF/lib
+         if (archives != null)
+         {
+            for (VirtualFile jar : archives)
+               addClassPath(structureContext, jar, true, true, context);
          }
-         else
+         else if (trace)
          {
-            if (trace)
-               log.trace("... no - not a directory or an archive.");
-            return false;
+            log.trace("No WEB-INF/lib for: " + file.getPathName());
          }
+
+         // do we include WEB-INF in classpath
+         if (includeWebInfInClasspath && webinf != null)
+         {
+            addClassPath(structureContext, webinf, true, false, context);
+         }
+
+         // There are no subdeployments for wars
+         return true;
       }
       catch (Exception e)
       {
@@ -265,6 +251,19 @@
       }
    }
 
+   @Override
+   protected boolean hasValidSuffix(String name)
+   {
+      return name.toLowerCase().endsWith(".war");
+   }
+   
+
+   @Override
+   protected void performMount(VirtualFile file) throws IOException
+   {
+      Automounter.mount(file, MountOption.EXPANDED, MountOption.COPY);
+   }
+
    protected void addPathsRecursively(StructureContext context, ContextInfo info, VirtualFile parent, String path) throws IOException
    {
       List<VirtualFile> children = parent.getChildren();

Modified: trunk/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -39,7 +39,7 @@
 import org.jboss.metadata.annotation.finder.AnnotationFinder;
 import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
 import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A POST_CLASSLOADER deployer which generates metadata from
@@ -104,15 +104,7 @@
       }
 
       VirtualFile root = unit.getRoot();
-      boolean isLeaf = true;
-      try
-      {
-         isLeaf = root.isLeaf();
-      }
-      catch(IOException ignore)
-      {
-      }
-      if(isLeaf == true)
+      if(root.isFile())
          return;
 
       List<VirtualFile> classpath = unit.getClassPath();

Modified: trunk/system/pom.xml
===================================================================
--- trunk/system/pom.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/pom.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -104,6 +104,10 @@
       <artifactId>jboss-kernel</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.jboss.kernel</groupId>
+      <artifactId>jboss-aop-mc-int</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.jboss.deployers</groupId>
       <artifactId>jboss-deployers-impl</artifactId>
     </dependency>

Modified: trunk/system/src/main/java/org/jboss/deployers/plugins/scanner/VFSDeploymentScannerImpl.java
===================================================================
--- trunk/system/src/main/java/org/jboss/deployers/plugins/scanner/VFSDeploymentScannerImpl.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/deployers/plugins/scanner/VFSDeploymentScannerImpl.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -43,9 +43,9 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.logging.Logger;
 import org.jboss.util.StringPropertyReplacer;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 
 /**
@@ -266,7 +266,7 @@
       if( uriList.add(uri) == true )
       {
          log.debug("Added URI: " + uri);
-         VirtualFile vf = VFS.getRoot(uri);
+         VirtualFile vf = VFS.getChild(uri);
          vdfList.add(vf);
       }      
    }
@@ -278,7 +278,7 @@
       {
          throw new NullPointerException("uri argument cannot be null");
       }
-      VirtualFile vf = VFS.getRoot(uri);
+      VirtualFile vf = VFS.getChild(uri);
       vdfList.remove(vf);
       boolean success = uriList.remove(uri);
       
@@ -304,7 +304,7 @@
       vdfList.clear();
       for (URI uri : uriList)
       {
-         VirtualFile vf = VFS.getRoot(uri);
+         VirtualFile vf = VFS.getChild(uri);
          vdfList.add(vf);
       }
 
@@ -563,18 +563,11 @@
        if we want to watch the same file as jboss4. But since not all files have a deployment
        descriptor, we need to be able to watch the deployment root anyway.
       */
-      try
+      DeploymentInfo info = new DeploymentInfo(deployment, vf.getLastModified());
+      if (!deployedMap.containsKey(vf))
       {
-         DeploymentInfo info = new DeploymentInfo(deployment, vf.getLastModified());
-         if (!deployedMap.containsKey(vf))
-         {
-            deployedMap.put(vf, info);
-         }
+         deployedMap.put(vf, info);
       }
-      catch(IOException e)
-      {
-         log.warn("Failed to obtain lastModified for: "+vf, e);
-      }
    }
 
    /**

Modified: trunk/system/src/main/java/org/jboss/system/server/profile/repository/AbstractImmutableProfile.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profile/repository/AbstractImmutableProfile.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profile/repository/AbstractImmutableProfile.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -30,7 +30,7 @@
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.system.server.profileservice.repository.AbstractVFSProfileSource;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A immutable vfs based profile.
@@ -73,6 +73,11 @@
       updateLastModfied();
    }
    
+   public void destroy()
+   {
+      super.destroy();
+   }
+   
    public ProfileKey getKey()
    {
       return this.key;
@@ -156,4 +161,12 @@
       //
    }
 
+   @Override
+   protected ProfileDeployment createDeployment(VirtualFile vf) throws Exception
+   {
+      String profileName = getKey().getName();
+      String deploymentName = createDeploymentName(vf);
+      return super.createDeployment(profileName, deploymentName, vf);
+   }
+   
 }

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/VFSScanner.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/VFSScanner.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/VFSScanner.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -40,9 +40,9 @@
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.util.JBossObject;
 import org.jboss.util.StringPropertyReplacer;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 import org.jboss.logging.Logger;
 
 /**
@@ -596,6 +596,6 @@
     */
    private VirtualFile getVFforURI(URI uri) throws IOException
    {
-      return VFS.getRoot(uri);
+      return VFS.getChild(uri);
    }
 }

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/attachments/AttachmentStore.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/attachments/AttachmentStore.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/attachments/AttachmentStore.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -27,7 +27,6 @@
 import org.jboss.managed.api.ManagedComponent;
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.system.server.profileservice.persistence.xml.PersistenceRoot;
-import org.jboss.virtual.VirtualFile;
 
 /**
  * The AttachmentStore.
@@ -48,21 +47,23 @@
    /**
     * Load the repository attachment meta data
     * 
-    * @param deploymentCtx the deployment root
+    * @param deploymentName the deployment name
+    * @param simpleName the simple name
     * @return the persisted meta data or null if it does not exist
     * @throws Exception
     */
-   RepositoryAttachmentMetaData loadMetaData(VirtualFile deploymentCtx) throws Exception;
+   RepositoryAttachmentMetaData loadMetaData(String deploymentName, String simpleName) throws Exception;
 
    /**
     * Load a attachment.
     * 
-    * @param deploymentCtx
+    * @param deploymentName
+    * @param simpleName
     * @param attachment
     * @return
     * @throws Exception
     */
-   PersistenceRoot loadAttachment(VirtualFile deploymentCtx, AttachmentMetaData attachment) throws Exception;
+   PersistenceRoot loadAttachment(String deploymentName, String simpleName, AttachmentMetaData attachment) throws Exception;
 
    /**
     * Persist the managed component.

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/PersistenceModificationChecker.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/PersistenceModificationChecker.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/PersistenceModificationChecker.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -29,9 +29,10 @@
 import org.jboss.deployers.spi.structure.StructureMetaData;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.plugins.vfs.helpers.IncludeFileNameVirtualFileFilter;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.util.SuffixMatchFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.SuffixMatchFilter;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
@@ -44,12 +45,12 @@
    private static final Logger log = Logger.getLogger(PersistenceModificationChecker.class);
 
    /** The filter. */
-   private static VirtualFileFilter filter = new IncludeFileNameVirtualFileFilter(".xml^");
+   private static VirtualFileFilter filter = new SuffixMatchFilter(".xml");
 
    public static boolean hasBeenModified(VFSDeploymentUnit unit, long lastModified) throws Exception
    {
       VirtualFile root = unit.getRoot();
-      if (root.isArchive() || root.isLeaf())
+      if (root.isFile())
       {
          if(root.getLastModified() > lastModified)
             return true;
@@ -77,7 +78,7 @@
          for (MetaDataEntry metaDataPath : metadataPaths)
          {
             VirtualFile mdpVF = root.getChild(metaDataPath.getPath());
-            if (mdpVF != null)
+            if (mdpVF.exists())
             {
                List<VirtualFile> children = mdpVF.getChildren(filter);
                if (children != null && children.isEmpty() == false)

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/ProfileServicePersistenceDeployer.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/ProfileServicePersistenceDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/persistence/deployer/ProfileServicePersistenceDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -32,7 +32,6 @@
 import org.jboss.system.server.profileservice.attachments.RepositoryAttachmentMetaData;
 import org.jboss.system.server.profileservice.persistence.PersistenceFactory;
 import org.jboss.system.server.profileservice.persistence.xml.PersistenceRoot;
-import org.jboss.virtual.VirtualFile;
 
 /**
  * The ProfileService Persistence Deployer. This deployer applies the
@@ -100,8 +99,9 @@
    
    protected void applyPersistentChanges(VFSDeploymentUnit unit) throws Throwable
    {
-      VirtualFile vf = unit.getRoot();
-      RepositoryAttachmentMetaData metaData = store.loadMetaData(vf);
+      String deploymentName = unit.getName();
+      String simpleName = unit.getSimpleName();
+      RepositoryAttachmentMetaData metaData = store.loadMetaData(deploymentName, simpleName);
       if(metaData == null)
          return;      
       
@@ -119,10 +119,10 @@
             Object instance = unit.getAttachment(attachment.getName());
             if(instance != null)
             {
-               PersistenceRoot root = this.store.loadAttachment(vf, attachment);
+               PersistenceRoot root = this.store.loadAttachment(deploymentName, simpleName, attachment);
                if(root == null)
                {
-                  log.warn("Null persisted information for deployment: " + vf);
+                  log.warn("Null persisted information for deployment: " + deploymentName);
                }
                // update ...
                getPersistenceFactory().restorePersistenceRoot(root, instance, unit.getClassLoader());

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractAttachmentStore.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractAttachmentStore.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractAttachmentStore.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -51,7 +51,8 @@
 import org.jboss.system.server.profileservice.attachments.RepositoryAttachmentMetaDataFactory;
 import org.jboss.system.server.profileservice.persistence.PersistenceFactory;
 import org.jboss.system.server.profileservice.persistence.xml.PersistenceRoot;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * The AbstractAttachmentStore.
@@ -144,9 +145,20 @@
    {
       Deployment mcDeployment = null;
       if(deployment.getRoot() == null)
+      {
          mcDeployment = new AbstractDeployment(deployment.getName());
+      }
       else
-         mcDeployment = deploymentFactory.createVFSDeployment(deployment.getRoot());
+      {
+         // Get the actual virtual file for the deployment
+         // NOTE the profileDeployment root points to a copy
+         URI deploymentURI = new URI(deployment.getName());
+         VirtualFile vf = VFS.getChild(deploymentURI);
+         
+         // we need to create a VFSDeployment with specifying the name
+         // otherwise we loose track of the deployments
+         mcDeployment = deploymentFactory.createVFSDeployment(deployment.getName(), vf);
+      }
 
       // Add the deployment attachments as PredeterminedManagedObjects
       Map<String, Object> attachments = deployment.getAttachments();
@@ -182,12 +194,14 @@
       return null;
    }
 
-   public RepositoryAttachmentMetaData loadMetaData(VirtualFile deploymentRoot) throws Exception
+   public RepositoryAttachmentMetaData loadMetaData(String deploymentName, String simpleName) throws Exception
    {
-      if(deploymentRoot == null)
-         throw new IllegalArgumentException("Null deployment root.");
+      if(deploymentName == null)
+         throw new IllegalArgumentException("Null deployment name.");
+      if(simpleName == null)
+         throw new IllegalArgumentException("null simple name");
 
-      String deploymentPath = createRelativeDeploymentPath(deploymentRoot);
+      String deploymentPath = createRelativeDeploymentPath(deploymentName, simpleName);
       return loadAttachmentMetaData(deploymentPath);
    }
 
@@ -217,16 +231,15 @@
       if(ctx == null)
          throw new IllegalStateException("Cannot persist attachment, failed to find deployment: " + deploymentName);
 
-      // Get the root
-      VirtualFile root = ctx.getRoot();
-      String deploymentPath = createRelativeDeploymentPath(root);
+      // Create the path
+      String deploymentPath = createRelativeDeploymentPath(ctx.getName(), ctx.getSimpleName());
 
       // Load previous saved information
       RepositoryAttachmentMetaData repositoryMetaData = loadAttachmentMetaData(deploymentPath);
       if(repositoryMetaData == null)
       {
          repositoryMetaData = RepositoryAttachmentMetaDataFactory.createInstance();
-         repositoryMetaData.setDeploymentName(root.getName());
+         repositoryMetaData.setDeploymentName(ctx.getSimpleName());
       }
 
       // Get the parent MO
@@ -315,16 +328,14 @@
      return root;
   }
 
-
-
-   public PersistenceRoot loadAttachment(VirtualFile deploymentCtx, AttachmentMetaData attachment) throws Exception
+   public PersistenceRoot loadAttachment(String deploymentName, String simpleName, AttachmentMetaData attachment) throws Exception
    {
-      if(deploymentCtx == null)
+      if(deploymentName == null)
          throw new IllegalArgumentException("Null deployment root.");
       if(attachment == null)
          throw new IllegalArgumentException("Null attachment");
 
-      String deploymentPath = createRelativeDeploymentPath(deploymentCtx);
+      String deploymentPath = createRelativeDeploymentPath(deploymentName, simpleName);
 
       // Load
       String attachmentPath = deploymentPath + attachment.getName();
@@ -350,19 +361,12 @@
     * @return the relative name
     * @throws Exception
     */
-   protected String createRelativeDeploymentPath(VirtualFile vf) throws Exception
+   protected String createRelativeDeploymentPath(String deploymentName, String simpleName) throws Exception
    {
-      if(vf == null)
-         throw new IllegalStateException("Null deployment.");
-
-      // deployment URI
-      String pathName = vf.toURI().toString();
-      String fileName = vf.getName();
       // Generate hash
-      String hash = HashGenerator.createHash(pathName);
+      String hash = HashGenerator.createHash(deploymentName);
       // simple name + "-" + hash
-      return fileName + "-" + hash + File.separator;
-
+      return simpleName + "-" + hash + File.separator;
    }
 
    /**
@@ -371,7 +375,6 @@
     * @param name the deployment context name
     * @return vfs deployment context or null if doesn't exist or not vfs based
     */
-   @SuppressWarnings("deprecation")
    protected VFSDeploymentContext getDeploymentContext(String name)
    {
       if (mainDeployer == null)

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractDeploymentRepository.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractDeploymentRepository.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractDeploymentRepository.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -35,7 +35,7 @@
 import org.jboss.profileservice.spi.NoSuchDeploymentException;
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A abstract VFS based deployment repository.

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractProfileDeployment.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractProfileDeployment.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractProfileDeployment.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -25,9 +25,8 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.profileservice.spi.ProfileDeployment;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * The profile deployment.
@@ -53,28 +52,6 @@
    /** The serialVersionUID. */
    private static final long serialVersionUID = -2208890215429044674L;
    
-   /**
-    * Get the vfs file name safely.
-    * @see VFSDeployment
-    * 
-    * @param root the virtual file
-    * @return the name
-    */
-   static final String safeVirtualFileName(VirtualFile root)
-   {
-      if (root == null)
-         throw new IllegalArgumentException("Null root");
-
-      try
-      {
-         return root.toURI().toString();
-      }
-      catch (Exception e)
-      {
-         return root.getName();
-      }
-   }
-   
    public AbstractProfileDeployment(String name)
    {
       if(name == null)
@@ -82,9 +59,11 @@
       this.name = name;
    }
    
-   public AbstractProfileDeployment(VirtualFile root)
+   public AbstractProfileDeployment(String name, VirtualFile root)
    {
-      this(safeVirtualFileName(root));
+      if(name == null)
+         throw new IllegalArgumentException("Null name.");
+      this.name = name;
       this.root = root;
    }
 
@@ -101,6 +80,10 @@
    /**
     * Get the root of the deployment.
     * 
+    * NOTE the {@link VirtualFile} will point to the original file
+    * in the filesystem, although URL will most probably not match
+    * since it gets mounted to a backup location {@see AutoUnmounter}.
+    * 
     * @return the root, or null if it's not a VFS deployment.
     */
    public VirtualFile getRoot()

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractVFSProfileSource.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractVFSProfileSource.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AbstractVFSProfileSource.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -37,9 +37,9 @@
 import org.jboss.profileservice.spi.NoSuchDeploymentException;
 import org.jboss.profileservice.spi.NoSuchProfileException;
 import org.jboss.profileservice.spi.ProfileDeployment;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * A abstract VFS based source for profile deployments.
@@ -50,6 +50,9 @@
 public abstract class AbstractVFSProfileSource
 {
    
+   /** The deployment factory. */
+   private static final DefaultProfileDeploymentFactory deploymentFactory = DefaultProfileDeploymentFactory.getInstance();
+   
    /** The repository uris. */
    protected final Collection<URI> uris;
 
@@ -71,6 +74,32 @@
    /** The logger. */
    protected final Logger log = Logger.getLogger(getClass());
    
+   /**
+    * Create the deployment name based on the {@link VirtualFile}.
+    * 
+    * @param root the virtual file
+    * @return the deployment name
+    * @throws URISyntaxException 
+    */
+   protected static String createDeploymentName(VirtualFile root) throws URISyntaxException
+   {
+      if (root == null)
+         throw new IllegalArgumentException("Null root");
+
+      return DefaultProfileDeploymentFactory.createDeploymentName(root);
+   }
+   
+   /**
+    * Create the deployment name based on a {@link URI}.
+    * 
+    * @param uri the deployment uri
+    * @return the deployment name
+    */
+   protected static String createDeploymentName(URI uri)
+   {
+      return DefaultProfileDeploymentFactory.createDeploymentName(uri);
+   }
+   
    public AbstractVFSProfileSource(URI[] uris)
    {
       if(uris == null)
@@ -123,8 +152,23 @@
       return this.lastModified;
    }
    
-   public void destroy()
+   public void destroy() 
    {
+      boolean trace = log.isTraceEnabled();
+      for(ProfileDeployment deployment : getDeployments())
+      {
+         try
+         {
+            deploymentFactory.cleanup(deployment.getName());
+         }
+         catch(IOException ignore)
+         {
+            if(trace)
+            {
+               log.trace("error while cleaning up the the deployment backup", ignore);
+            }
+         }
+      }
       // Unload
       this.applicationCtxs.clear();
       this.applicationVFCache.clear();
@@ -178,9 +222,12 @@
       
       // Get the deployment
       ProfileDeployment deployment = getDeployment(vfsPath);
+      String deploymentName = deployment.getName();
       // Remove the entries
-      this.applicationCtxs.remove(deployment.getName());
-      this.applicationVFCache.remove(deployment.getName());
+      this.applicationCtxs.remove(deploymentName);
+      this.applicationVFCache.remove(deploymentName);
+      // Cleanup the backup
+      deploymentFactory.cleanup(deploymentName);
       // Update last modified
       updateLastModfied();
       // Return
@@ -214,7 +261,7 @@
     */
    protected void addedDeployments(List<VirtualFile> list, VirtualFile root) throws IOException, URISyntaxException
    {
-      if(root.isLeaf() == true || root.isArchive() == true)
+      if(root.isFile() == true)
       {
          addedDeployment(list, root);
       }
@@ -247,12 +294,12 @@
       }
       
       // Check if we accept this deployment
-      String key = component.toURI().toString();
+      String key = createDeploymentName(component);
       if(acceptsDeployment(key) == false)
          return;
 
       // If it's a directory or exploded deployment
-      if(component.isLeaf() == false && component.isArchive() == false)
+      if(component.isFile() == false)
       {
          // Check the name
          if(isRecursiveScan() && component.getName().indexOf('.') == -1)
@@ -319,9 +366,10 @@
     * @throws MalformedURLException
     * @throws URISyntaxException
     */
+   @Deprecated
    protected String addVirtualFileCache(VirtualFile vf) throws MalformedURLException, URISyntaxException
    {
-      String uri = vf.toURI().toString();
+      String uri = createDeploymentName(vf);
       this.applicationVFCache.put(uri, vf);
       return uri;
    }
@@ -332,6 +380,7 @@
     * @param name the name
     * @return the virtual file or null, if it does not exist
     */
+   @Deprecated
    protected VirtualFile getCachedVirtualFile(String name)
    {
       return this.applicationVFCache.get(name);
@@ -343,29 +392,42 @@
     * 
     * @param uri the uri
     * @return the virtual file
-    * @throws IOException
+    * @throws Exception
     */
+   @Deprecated
    protected VirtualFile getCachedVirtualFile(URI uri) throws IOException 
    {
       VirtualFile vf = getCachedVirtualFile(uri.toString());
       if(vf == null)
       {
-         vf = VFS.getRoot(uri);
-         this.applicationVFCache.put(uri.toString(), vf);
+         vf = VFS.getChild(uri);
+         String name = createDeploymentName(uri);
+         this.applicationVFCache.put(name, vf);
       }
       return vf;
    }
    
    /**
-    * Create a ProfileDeployment, based on the virtual file.
+    * Create a profile deployment.
     * 
+    * @param vf the original virtual file
+    * @return the profile deployment
+    * @throws Exception
+    */
+   protected abstract ProfileDeployment createDeployment(VirtualFile vf) throws Exception;
+   
+   /**
+    * Create a ProfileDeployment, based on avirtual file.
+    * 
+    * @param profileName the profile name
+    * @param name the deployment name
     * @param vf the deployment root
     * @return the profile deployment
     * @throws Exception
     */
-   protected static ProfileDeployment createDeployment(VirtualFile vf) throws Exception
-   {
-      return new AbstractProfileDeployment(vf);
+   protected static ProfileDeployment createDeployment(String profileName, String name, VirtualFile original) throws Exception
+   {           
+      return deploymentFactory.createProfileDeployment(profileName, name, original);
    }
    
    /**

Copied: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AutoUnmounter.java (from rev 101636, branches/vfs3-int/system/src/main/java/org/jboss/system/server/profileservice/repository/AutoUnmounter.java)
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AutoUnmounter.java	                        (rev 0)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/AutoUnmounter.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -0,0 +1,85 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat 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.system.server.profileservice.repository;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.automount.Automounter;
+
+/**
+ * The counterpart to {@link Automounter}, preserving a mount to the original
+ * {@link VirtualFile} used by profileservice.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+class AutoUnmounter
+{
+
+   /** The closeables. */
+   private Map<String, Closeable> mounts = new ConcurrentHashMap<String, Closeable>(); 
+
+   /** The originals root. */
+   // TODO better name: ${server.temp.dir}... 
+   private VirtualFile originals = VFS.getChild("/profileservice/originals/"); 
+   
+   /**
+    * Backup a virtual file to preserve the original location.
+    * 
+    * @param profileName the profile name
+    * @param name the deployment name
+    * @param original the original file
+    * @return the backup
+    * @throws IOException
+    */
+   VirtualFile backup(String profileName, String name, VirtualFile original) throws IOException
+   {
+      File realFile = original.getPhysicalFile();
+      VirtualFile backup = originals.getChild(profileName).getChild(realFile.getName());
+      Closeable closeable = VFS.mountReal(realFile, backup);
+      mounts.put(name, closeable);
+      return backup;
+   }
+   
+   /**
+    * Cleanup
+    * 
+    * @param name
+    * @throws IOException
+    */
+   void cleanup(String name) throws IOException
+   {
+      Closeable closeable = mounts.remove(name);
+      if(closeable != null)
+      {
+         closeable.close();
+      }
+   }
+  
+}
+

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/BasicDeploymentRepository.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/BasicDeploymentRepository.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/BasicDeploymentRepository.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -41,8 +41,8 @@
 import org.jboss.profileservice.spi.ModificationInfo;
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A basic deployment repository.
@@ -211,7 +211,7 @@
          }
 
          // Get the vfs uri and add the VFS uri to the cached VFS uris
-         VirtualFile contentVF = VFS.getRoot(contentFile.toURI());
+         VirtualFile contentVF = VFS.getChild(contentFile.toURI());
          try
          {
             // Add the new virtual file to the cache
@@ -276,7 +276,7 @@
          ProfileDeployment deployment = getDeployment(vfsPath);
          VirtualFile root = deployment.getRoot();
          
-         if(deleteFile && root != null)
+         if(deleteFile && root != null && root.exists())
          {
             // Delete the file, fail if it can't be deleted and still exists
             if(root.delete() == false && root.exists())
@@ -312,6 +312,16 @@
       // FIXME remove
    }
    
+   @Override
+   protected ProfileDeployment createDeployment(VirtualFile vf) throws Exception
+   {
+      // Create a profile deployment
+      // NOTE the vfs root of profile deployment points to a backup location
+      String profileName = getProfileKey().getName();
+      String deploymentName = createDeploymentName(vf);
+      return super.createDeployment(profileName, deploymentName, vf);
+   }
+   
    /**
     * Lock for read
     */

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultDeploymentRepositoryFactory.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultDeploymentRepositoryFactory.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultDeploymentRepositoryFactory.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -35,7 +35,7 @@
 import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
 import org.jboss.system.server.profile.repository.metadata.HotDeploymentProfileSourceMetaData;
 import org.jboss.system.server.profile.repository.metadata.ImmutableProfileSourceMetaData;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * The default repository factory for immutable and mutable repositories.

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultProfileDeploymentFactory.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultProfileDeploymentFactory.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/DefaultProfileDeploymentFactory.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -21,8 +21,12 @@
  */ 
 package org.jboss.system.server.profileservice.repository;
 
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
 import org.jboss.profileservice.spi.ProfileDeployment;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Basic ProfileDeploymentFactory.
@@ -30,12 +34,26 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class DefaultProfileDeploymentFactory
+public class DefaultProfileDeploymentFactory extends AutoUnmounter
 {
 
    /** The instance. */
    private static final DefaultProfileDeploymentFactory INSTANCE = new DefaultProfileDeploymentFactory();
+
+   public static String createDeploymentName(VirtualFile original) throws URISyntaxException
+   {
+      return createDeploymentName(original.toURI());
+   }
    
+   public static String createDeploymentName(URI uri)
+   {
+      // Always use the name without the "/"
+      String name = uri.toString();
+      if(name.endsWith("/"))
+         return name.substring(0, name.length() -1);
+      return name;
+   }
+   
    protected DefaultProfileDeploymentFactory()
    {
       //
@@ -51,10 +69,26 @@
       return new AbstractProfileDeployment(name);
    }
    
-   public ProfileDeployment createProfileDeployment(VirtualFile vf)
+   @Deprecated
+   public ProfileDeployment createProfileDeployment(VirtualFile vf) throws URISyntaxException 
    {
-      return new AbstractProfileDeployment(vf);
+      String name = createDeploymentName(vf);
+      return new AbstractProfileDeployment(name, vf);
    }
    
+   public ProfileDeployment createProfileDeployment(String profileName, String name, VirtualFile original) throws IOException
+   {
+      VirtualFile copy = backup(profileName, name, original);
+      return new AbstractProfileDeployment(name, copy);
+   }
+
+   /**
+    * Cleanup the deployment
+    */
+   public void cleanup(String deploymentName) throws IOException
+   {
+      super.cleanup(deploymentName);
+   }
+   
 }
 

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/FilteredProfileFactory.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/FilteredProfileFactory.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/FilteredProfileFactory.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -22,7 +22,6 @@
 package org.jboss.system.server.profileservice.repository;
 
 import java.io.FileNotFoundException;
-import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
@@ -39,7 +38,7 @@
 import org.jboss.profileservice.spi.metadata.ProfileSourceMetaData;
 import org.jboss.system.server.profile.repository.AbstractImmutableProfile;
 import org.jboss.system.server.profile.repository.metadata.FilteredProfileMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A filtered profile factory.
@@ -144,14 +143,14 @@
          updateLastModfied();
       }
 
-      protected VirtualFile resolveDeploymentName(String deploymentName) throws IOException
+      protected VirtualFile resolveDeploymentName(String deploymentName) throws Exception
       {
          List<VirtualFile> list = new ArrayList<VirtualFile>();
          for(URI uri : getRepositoryURIs())
          {
             VirtualFile repo = getCachedVirtualFile(uri);
             VirtualFile vf = repo.getChild(deploymentName);
-            if(vf != null)
+            if(vf.exists())
                list.add(vf);
          }
          if(list.size() == 0)

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/HotDeploymentRepository.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/HotDeploymentRepository.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/HotDeploymentRepository.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -33,7 +33,7 @@
 import org.jboss.profileservice.spi.ProfileDeployment;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ModificationInfo.ModifyStatus;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A deployment repository, with hot deployment capabilities.
@@ -118,7 +118,7 @@
                }
                // Check for modification
                else if (hasDeploymentContentFlags(pathName, DeploymentContentFlags.MODIFIED)
-                     || getChecker().hasStructureBeenModified(root))
+                     || getChecker().hasStructureBeenModified(pathName, root))
                {
                   long rootLastModified = root.getLastModified();
                   if (trace)

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/XmlProfileFactory.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -36,8 +36,8 @@
 import org.jboss.system.server.profile.repository.metadata.FilteredProfileMetaData;
 import org.jboss.system.server.profile.repository.metadata.HotDeploymentProfileMetaData;
 import org.jboss.system.server.profile.repository.metadata.ProfilesMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.xb.binding.JBossXBException;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
@@ -84,10 +84,10 @@
       this.profileDirectories = new ArrayList<VirtualFile>();
       for(URI uri : profileDirectories)
       {
-         VirtualFile vf = VFS.getRoot(uri);
-         if(vf == null)
+         VirtualFile vf = VFS.getChild(uri);
+         if(vf.exists() == false)
             throw new IllegalArgumentException("Could not find uri: " + vf);
-         if(vf.isLeaf())
+         if(vf.isFile())
             throw new IllegalArgumentException("Not a directory: " + vf);
          this.profileDirectories.add(vf);
       }
@@ -250,7 +250,7 @@
    protected VirtualFile getProfileFile(ProfileKey key, URL url) throws Exception
    {
       if(url != null)
-         return VFS.getRoot(url);
+         return VFS.getChild(url);
       else
          return resolveFile(key.getName());
    }

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -46,8 +46,8 @@
 import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryContentMetadata;
 import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryItemMetadata;
 import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryRootMetadata;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * DeploymentRepository that keeps its contents in sync across a cluster.
@@ -492,7 +492,7 @@
       {
          try
          {
-            VFS.getRoot(uri);
+            VFS.getChild(uri);
             list.add(uri);
          }
          catch (Exception e)

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepositoryFactory.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepositoryFactory.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepositoryFactory.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -43,7 +43,7 @@
 import org.jboss.system.server.profileservice.repository.clustered.metadata.ClusteredProfileSourceMetaData;
 import org.jboss.system.server.profileservice.repository.clustered.metadata.HotDeploymentClusteredProfileSourceMetaData;
 import org.jboss.system.server.profileservice.repository.clustered.metadata.ImmutableClusteredProfileSourceMetaData;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Factory for clustered deployment repositories.

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/RepositoryClusteringHandler.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/RepositoryClusteringHandler.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/RepositoryClusteringHandler.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -30,7 +30,7 @@
 import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryContentMetadata;
 import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryItemMetadata;
 import org.jboss.system.server.profileservice.repository.clustered.sync.InconsistentRepositoryStructureException;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Handles intra-cluster operations for a clustered DeploymentRepository.

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/AbstractLocalContentManager.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/AbstractLocalContentManager.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/AbstractLocalContentManager.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -46,8 +46,8 @@
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationActionContext;
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationId;
 import org.jboss.system.server.profileservice.repository.clustered.sync.TwoPhaseCommitAction;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Abstract base class for a {@link LocalContentManager} implementation.
@@ -697,7 +697,7 @@
       VirtualFile vf = this.vfCache.get(uri.toString());
       if(vf == null)
       {
-         vf = VFS.getRoot(uri);
+         vf = VFS.getChild(uri);
          this.vfCache.put(uri.toString(), vf);
       }
       return vf;
@@ -815,7 +815,7 @@
    
    private static boolean isDirectory(VirtualFile file) throws IOException
    {
-      return (!file.isLeaf() && !file.isArchive());
+      return file.isDirectory();
    }
    
    private static List<String> getRelativePath(VirtualFile file, VirtualFile root)

Modified: trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManager.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManager.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/local/LocalContentManager.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -35,7 +35,7 @@
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationAction;
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationActionContext;
 import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationId;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Object responsible for the local persistence operations associated with a

Modified: trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -45,8 +45,8 @@
 import org.jboss.system.server.profileservice.hotdeploy.Scanner;
 import org.jboss.system.server.profileservice.repository.HotDeploymentRepository;
 import org.jboss.system.server.profileservice.repository.TypedProfileRepository;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.plugins.vfs.helpers.PathTokenizer;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.PathTokenizer;
 
 /**
  * Profile deployment repository adapter.
@@ -235,17 +235,10 @@
             {
                for (ProfileDeployment pd : deployments)
                {
-                  VirtualFile root = pd.getRoot();
-                  if (root != null)
+                  // Only include VFS based deployments
+                  if(pd.getRoot() != null)
                   {
-                     try
-                     {
-                        urls.add(root.toURL().toExternalForm());
-                     }
-                     catch (Exception e)
-                     {
-                        log.warn("Exception while reading root's URL: " + root);
-                     }
+                     urls.add(pd.getName());
                   }
                }
             }
@@ -367,7 +360,7 @@
             for (VirtualFile file : files)
             {
                // the key is URI
-               String name = file.toURI().toString();
+               String name = createDeploymentName(file.toURI());
                // it still exists - remove it
                if (acceptsDeployment(name) == false)
                {

Modified: trunk/system/src/resources/tests/bootstrap/defaulthotdeploy/deployer-beans.xml
===================================================================
--- trunk/system/src/resources/tests/bootstrap/defaulthotdeploy/deployer-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/resources/tests/bootstrap/defaulthotdeploy/deployer-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -31,7 +31,7 @@
                   <bean name="JARStructureCandidates" class="org.jboss.deployers.plugins.structure.vfs.jar.JARCandidateStructureVisitorFactory">
                      <!-- A filter to exclude some obvious non-subdeployments -->
                      <property name="filter">
-                        <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                        <bean name="JARFilter" class="org.jboss.vfs.util.SuffixesExcludeFilter">
                            <constructor><parameter>
                               <list elementClass="java.lang.String">
                                  <!-- Exclude class files as subdeployments -->

Modified: trunk/system/src/tests/org/jboss/test/server/profileservice/support/MockAttachmentStore.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/support/MockAttachmentStore.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/support/MockAttachmentStore.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -32,7 +32,7 @@
 import org.jboss.system.server.profileservice.attachments.AttachmentStore;
 import org.jboss.system.server.profileservice.attachments.RepositoryAttachmentMetaData;
 import org.jboss.system.server.profileservice.persistence.xml.PersistenceRoot;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>

Modified: trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/test/BootstrapProfileFactoryUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -34,7 +34,6 @@
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.system.server.profileservice.repository.AbstractBootstrapProfileFactory;
 import org.jboss.system.server.profileservice.repository.XmlProfileFactory;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
@@ -68,9 +67,6 @@
             new URI[] { one.toURI(), two.toURI() });
       profileFactory.setProfileFactory(createProfileFactory());
       
-      // Clear jar suffixes.
-      JarUtils.clearSuffixes();
-      
       // Parse
       Collection<Profile> profiles = profileFactory.createProfiles(new ProfileKey("default"), null);
       assertNotNull(profiles);

Modified: trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system/src/tests/org/jboss/test/server/profileservice/test/ProfileServiceUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -38,7 +38,6 @@
 import org.jboss.system.server.profileservice.repository.XmlProfileFactory;
 import org.jboss.test.server.profileservice.support.MockAttachmentStore;
 import org.jboss.test.server.profileservice.support.MockMainDeployer;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
@@ -86,9 +85,6 @@
             new URI[] { one.toURI(), two.toURI() });
       profileFactory.setProfileFactory(createProfileFactory());
       
-      // Clear jar suffixes.
-      JarUtils.clearSuffixes();
-      
       // A list of profile keys
       List<ProfileKey> keys = new ArrayList<ProfileKey>();
       

Modified: trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java
===================================================================
--- trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -52,8 +52,8 @@
 import org.jboss.util.file.Files;
 import org.jboss.util.file.JarUtils;
 import org.jboss.util.stream.Streams;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * The legacy component for deployer management. This now simply delegates to the
@@ -363,7 +363,7 @@
          try
          {
             // avoid caching
-            VirtualFile file = VFS.createNewRoot(url);
+            VirtualFile file = VFS.getChild(url);
             VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
             delegate.addDeployment(deployment);
             deploymentName = deployment.getName();

Modified: trunk/system-jmx/src/main/java/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- trunk/system-jmx/src/main/java/org/jboss/system/server/jmx/JMXKernel.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/system-jmx/src/main/java/org/jboss/system/server/jmx/JMXKernel.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -71,8 +71,8 @@
 import org.jboss.system.server.ServerInfoMBean;
 import org.jboss.util.JBossObject;
 import org.jboss.util.file.FileSuffixFilter;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A pojo that creates a legacy jmx kernel ala the jboss-4.x server bootstrap.
@@ -563,7 +563,7 @@
       for (int i = 0; i < list.size(); ++i)
       {
          URL url = list.get(i);
-         files[i] = VFS.getRoot(url);
+         files[i] = VFS.getChild(url);
       }
       
       VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(files);

Modified: trunk/testsuite/build.sh
===================================================================
--- trunk/testsuite/build.sh	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/build.sh	2010-03-01 18:27:16 UTC (rev 101688)
@@ -145,7 +145,7 @@
     fi
 
     # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="$ANT_OPTS -Djava.protocol.handler.pkgs=org.jboss.net.protocol"
+    #ANT_OPTS="$ANT_OPTS -Djava.protocol.handler.pkgs=org.jboss.net.protocol"
 
     # setup some build properties
     ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/build.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -272,6 +272,7 @@
       <fileset refid="org.jboss.ejb3:jboss-ejb3-proxy-impl:jar"/>
       <fileset refid="org.jboss.ejb3:jboss-ejb3-proxy-impl:jar:client"/>
       <fileset refid="org.jboss.ejb3:jboss-ejb3-proxy-spi:jar:client"/>
+      <fileset refid="org.jboss.ejb3.vfs:jboss-ejb3-vfs-spi:jar"/>
       <fileset refid="org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar"/>
       <fileset refid="org.hibernate:hibernate-annotations:jar"/>
       <fileset refid="org.hibernate:hibernate-core:jar"/>
@@ -1646,7 +1647,6 @@
          <sysproperty key="jboss.dist" value="${jboss.dist}"/>
          <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
          <sysproperty key="build.testlog" value="${build.testlog}"/>
-      	 <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
          <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
          <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
          <sysproperty key="jbosstest.server.host" value="${node0}"/>
@@ -1718,7 +1718,6 @@
          <sysproperty key="jboss.dist" value="${jboss.dist}"/>
          <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
          <sysproperty key="build.testlog" value="${build.testlog}"/>
-         <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
          <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
          <sysproperty key="java.naming.factory.initial" value="org.jboss.naming.HttpNamingContextFactory"/>
          <sysproperty key="java.naming.provider.url" value="${node0.jndi.http.url}"/>
@@ -1782,7 +1781,6 @@
          <sysproperty key="jboss.dist" value="${jboss.dist}"/>
          <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
          <sysproperty key="build.testlog" value="${build.testlog}"/>
-      	 <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
          <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
          <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
          <sysproperty key="jbosstest.server.host" value="${node0}"/>
@@ -2767,7 +2765,7 @@
    </target>
 
     <!-- Run the Web Services Tests-->
-   <target name="tests-webservice"
+   <target name="tests-webservice" depends="init" 
       description="Execute Web Services Related Tests">
 
       <junit dir="${module.output}"
@@ -2788,7 +2786,6 @@
          <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/>
          <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
          <!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
-         <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
          <sysproperty key="jbosstest.server.host" value="${node0}"/>
          <sysproperty key="build.testlog" value="${build.testlog}"/>
          <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
@@ -2848,8 +2845,6 @@
          <sysproperty key="java.security.policy" value="${build.resources}/security/tst.policy"/>
          <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/>
          <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
-         <!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
-         <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
          <sysproperty key="jbosstest.server.host" value="${node0}"/>
          <sysproperty key="build.testlog" value="${build.testlog}"/>
          <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
@@ -3361,9 +3356,6 @@
          </syspropertyset>
          <sysproperty key="java.security.auth.login.config"
             value="${build.resources}/security/auth.conf"/>
-         <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
-         <sysproperty key="jboss.vfs.forceCopy" value="true"/>
-
          <classpath>
             <pathelement location="${build.classes}"/>
             <pathelement location="${build.resources}"/>
@@ -3504,8 +3496,6 @@
          <jvmarg value="-Dbind.address=${node0}"/>
          <sysproperty key="jboss.dist" value="${jboss.dist}"/>
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed"/>
-         <!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
-         <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
          <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
          <sysproperty key="build.testlog" value="${build.testlog}"/>
          <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>

Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/imports/server-config.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -1380,8 +1380,6 @@
             <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
             <sysproperty key="jbosstest.server.host" value="${node0}"/>
             <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed"/>
-            <!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
-            <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
             <syspropertyset>
                <propertyref prefix="jbosstest"/>
             </syspropertyset>

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeploymentRepoAddContentTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeploymentRepoAddContentTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeploymentRepoAddContentTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -42,7 +42,6 @@
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossClusteredTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  *
@@ -131,7 +130,7 @@
       // TODO - hack to get off JDK's url handling
       String urlString = contentURL.toExternalForm();
       int p = urlString.indexOf(":/");
-      contentURL = new URL("vfszip" + urlString.substring(p));
+      contentURL = new URL("file" + urlString.substring(p));
       getLog().debug(contentURL);
 
       DeploymentStatus status;
@@ -210,8 +209,6 @@
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          deployMgr = ps.getDeploymentManager();
          deployMgr.loadProfile(getProfileKey());
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       return deployMgr;
    }
@@ -228,8 +225,6 @@
       {
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       // Reload
       activeView.load();

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHotDeployUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHotDeployUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHotDeployUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -41,7 +41,6 @@
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossClusteredTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  * @author Brian Stansberry
@@ -198,8 +197,6 @@
       {
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       // Reload
       activeView.load();

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHugeDeploymentUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHugeDeploymentUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHugeDeploymentUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -43,7 +43,6 @@
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossClusteredTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  * Test for JBAS-7102. Creates a war w/ 150MB of content in the farm
@@ -257,8 +256,6 @@
       {
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       // Reload
       activeView.load();

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ChannelFactoryManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ChannelFactoryManagedObjectsTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ChannelFactoryManagedObjectsTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -46,7 +46,6 @@
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossClusteredTestCase;
 import org.jboss.test.cluster.channelfactory.managed.ManagedObjectTestUtil;
-import org.jboss.virtual.VFS;
 
 /**
  * Validates the expected ChannelFactory-related ManagedObjects are there
@@ -289,8 +288,6 @@
          
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       activeView.load();
       return activeView;

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ClusterPartitionManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ClusterPartitionManagedObjectsTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/ClusterPartitionManagedObjectsTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -40,7 +40,6 @@
 import org.jboss.metatype.api.values.SimpleValueSupport;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossClusteredTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  * Validates the expected HAPartition-related ManagedObjects are there
@@ -296,8 +295,6 @@
          
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       activeView.load();
       return activeView;

Modified: trunk/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -74,7 +74,6 @@
        "org.jboss.cache.ReplicationException",
        "org.jboss.logging.XLevel",
        "org.jboss.mx.util.InstanceOfQueryExp",
-       "org.jboss.virtual.plugins.context.jar.NestedJarFromStream",
        "org.jboss.console",
        "org.jboss.ejb3.stateful.StatefulBeanContextReference",
        "org.jboss.iiop",
@@ -136,9 +135,6 @@
       "org.jboss.security.SimplePrincipal",
       "org.jboss.security.SubjectSecurityProxyFactory",
       "org.jboss.services.binding.DuplicateServiceException",
-      // unclear if vfs classes are serialized to client
-      "org.jboss.virtual.plugins.context.vfs.AssembledDirectoryHandler",
-      "org.jboss.virtual.plugins.context.zip.ZipEntryHandler",
       // ignore webservices framework classes
       "org.jboss.wsf",
       // lib/endorsed/stax-api.jar
@@ -157,8 +153,6 @@
 	"org.jacorb",
 	"javax.faces",
 	"org.jboss.resource.adapter.jdbc.vendor.MSSQLValidConnectionChecker",
- 	"org.jboss.virtual.AssembledDirectory",
-        "org.jboss.virtual.plugins.context.vfs.AssembledFileHandler",
         "javax.xml.ws.soap.SOAPFaultException",
 	"org.jboss.metadata.ear.jboss.JBossAppMetaData",
 	"org.jboss.metadata.jpa.spec.PersistenceUnitMetaData",
@@ -211,8 +205,6 @@
       "org.jboss.security.SubjectSecurityProxyFactory",
       "org.jboss.services.binding.DuplicateServiceException",
       // unclear if vfs classes are serialized to client
-      "org.jboss.virtual.plugins.context.vfs.AssembledDirectoryHandler",
-      "org.jboss.virtual.plugins.context.zip.ZipEntryHandler",
       // ignore webservices framework classes
       "org.jboss.wsf",
       // lib/endorsed/stax-api.jar
@@ -231,10 +223,6 @@
 	"org.jacorb",
 	"javax.faces",
 	"org.jboss.resource.adapter.jdbc.vendor.MSSQLValidConnectionChecker",
- 	"org.jboss.virtual.AssembledDirectory",
- 	"org.jboss.virtual.AssembledDirectoryHandler",
-        "org.jboss.virtual.plugins.context.vfs.AssembledFileHandler",
-        "org.jboss.virtual.plugins.context.zip.ZipEntryHandler",
         "javax.xml.ws.soap.SOAPFaultException",
 	"org.jboss.metadata.ear.jboss.JBossAppMetaData",
 	"org.jboss.metadata.jpa.spec.PersistenceUnitMetaData",
@@ -283,14 +271,10 @@
 	"org.jgroups",
 	"javax.faces",
 	"org.jboss.resource.adapter.jdbc.vendor.MSSQLValidConnectionChecker",
- 	"org.jboss.virtual.AssembledDirectory",
-        "org.jboss.virtual.plugins.context.vfs.AssembledFileHandler",
         "javax.xml.ws.soap.SOAPFaultException",
 	"org.jboss.classloading.spi.dependency.Module",
         "org.jboss.metadata.ear.jboss.JBossAppMetaData",
 	"org.jboss.metadata.jpa.spec.PersistenceUnitMetaData",
-	"org.jboss.virtual.plugins.context.vfs.AssembledDirectoryHandler",
-        "org.jboss.virtual.plugins.context.zip.ZipEntryHandler",
         // ignore webservices framework classes as done in other test versions
         "org.jboss.wsf",
         // those were changed to match 423 ids

Modified: trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -50,7 +50,6 @@
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossTestCase;
 import org.jboss.test.JBossTestSetup;
-import org.jboss.virtual.VFS;
 
 /**
  * Abstract deployment test.
@@ -259,8 +258,6 @@
       ProfileService ps = (ProfileService)ctx.lookup("ProfileService");
       ManagementView activeView = ps.getViewManager();
       activeView.load();
-      // Init the VFS to setup the vfs* protocol handlers
-      VFS.init();
       return activeView;
    }
 

Modified: trunk/testsuite/src/main/org/jboss/test/deployers/seam/test/SeamVFSClassloadingUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/seam/test/SeamVFSClassloadingUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/seam/test/SeamVFSClassloadingUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -22,10 +22,14 @@
 package org.jboss.test.deployers.seam.test;
 
 import java.io.IOException;
+import java.io.Closeable;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.Arrays;
-import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
 
 import junit.framework.Test;
 
@@ -33,8 +37,10 @@
 import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
 import org.jboss.mx.loading.UnifiedLoaderRepository3;
 import org.jboss.test.JBossTestCase;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.TempFileProvider;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VFSUtils;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
@@ -43,6 +49,9 @@
  */
 public class SeamVFSClassloadingUnitTestCase extends JBossTestCase
 {
+   private TempFileProvider provider;
+   private List<Closeable> handles;
+
    public SeamVFSClassloadingUnitTestCase(String string)
    {
       super(string);
@@ -53,6 +62,18 @@
       return suite(SeamVFSClassloadingUnitTestCase.class);
    }
 
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+
+      provider = TempFileProvider.create("test", new ScheduledThreadPoolExecutor(2));
+   }
+
+   public void tearDown() throws Exception 
+   {
+       VFSUtils.safeClose(handles);
+   }
+
    /*
    jboss-seam-booking.ear contents
    META-INF/application.xml
@@ -82,15 +103,15 @@
    jboss-seam-booking.war/WEB-INF/pages.xml
    jboss-seam-booking.war/WEB-INF/web.xml
    */
-   protected VirtualFile getRoot(boolean noCopy) throws IOException
+   protected VirtualFile getRoot() throws IOException, URISyntaxException
    {
       URL url = getDeployURL("jboss-seam-booking.ear");
-      if(noCopy)
-         url = new URL(url.toExternalForm() + "?useNoCopyJarHandler=true");
       assertNotNull(url);
-      VFS vfs = VFS.getVFS(url);
-      VirtualFile vf = vfs.getRoot();
-      assertNotNull(vf);
+      VirtualFile vf = VFS.getChild(url);
+	
+      handles = recursiveMount(vf);
+	
+      assertTrue(vf.exists());
       return vf;
    }
    protected URL[] getEarClassPath(VirtualFile ear)
@@ -99,37 +120,33 @@
       URL[] cp = {
          // ear
          ear.toURL(),
-         ear.findChild("lib/commons-beanutils.jar").toURL(),
-         ear.findChild("lib/commons-digester.jar").toURL(),
-         ear.findChild("lib/commons-digester.jar").toURL(),
-         ear.findChild("lib/jboss-el.jar").toURL(),
-         ear.findChild("lib/richfaces-api.jar").toURL(),
-         ear.findChild("jboss-seam.jar").toURL(),
-         ear.findChild("jboss-seam-booking.jar").toURL(),
-         ear.findChild("jboss-seam-booking.war/WEB-INF/classes/").toURL(),
-         ear.findChild("jboss-seam-booking.war/WEB-INF/lib/jboss-seam-debug.jar").toURL(),
-         ear.findChild("jboss-seam-booking.war/WEB-INF/lib/jboss-seam-ui.jar").toURL(),
-         ear.findChild("jboss-seam-booking.war/WEB-INF/lib/jsf-facelets.jar").toURL(),
-         ear.findChild("jboss-seam-booking.war/WEB-INF/lib/richfaces-impl.jar").toURL(),
-         ear.findChild("jboss-seam-booking.war/WEB-INF/lib/richfaces-ui.jar").toURL(),
+         ear.getChild("lib/commons-beanutils.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("lib/commons-digester.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("lib/commons-digester.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("lib/jboss-el.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("lib/richfaces-api.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.war/WEB-INF/classes/").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.war/WEB-INF/lib/jboss-seam-debug.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.war/WEB-INF/lib/jboss-seam-ui.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.war/WEB-INF/lib/jsf-facelets.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.war/WEB-INF/lib/richfaces-impl.jar").getPhysicalFile().toURI().toURL(),
+         ear.getChild("jboss-seam-booking.war/WEB-INF/lib/richfaces-ui.jar").getPhysicalFile().toURI().toURL(),
       };
       return cp;
    }
 
    public void testURLClassLoader() throws Exception
    {
-      VirtualFile ear = getRoot(false);
+      VirtualFile ear = getRoot();
       testURLClassLoader(ear);
    }
-   public void testURLClassLoaderNoCopy() throws Exception
-   {
-      VirtualFile ear = getRoot(true);
-      testURLClassLoader(ear);
-   }
+
    protected void testURLClassLoader(VirtualFile ear) throws Exception
    {
       URL[] cp = getEarClassPath(ear);
-      log.debug("ear classpath: "+Arrays.asList(cp));
+      log.error("ear classpath: "+Arrays.asList(cp));
       URLClassLoader loader = new URLClassLoader(cp);
       loader.loadClass("org.jboss.seam.example.booking.Hotel");
       loader.loadClass("org.jboss.seam.debug.Contexts");      
@@ -137,14 +154,10 @@
 
    public void testULRClassloading() throws Exception
    {
-      VirtualFile ear = getRoot(false);
+      VirtualFile ear = getRoot();
       testULRClassloading(ear);
    }
-   public void testULRClassloadingNoCopy() throws Exception
-   {
-      VirtualFile ear = getRoot(true);
-      testULRClassloading(ear);
-   }
+
    public void testULRClassloading(VirtualFile ear) throws Exception
    {
       URL[] cp = getEarClassPath(ear);
@@ -158,13 +171,28 @@
 
    public void testVFSPolicy() throws Exception
    {
-      VirtualFile vf = getRoot(false);
-      VirtualFile child = vf.getChild("jboss-seam-booking.war/WEB-INF/lib/jboss-seam-debug.jar");
-      assertNotNull(child);
+      VirtualFile vf = getRoot();
+      VirtualFile childWar = vf.getChild("jboss-seam-booking.war");
+      VirtualFile child = childWar.getChild("/WEB-INF/lib/jboss-seam-debug.jar");
+      assertTrue(child.exists());
       VirtualFile[] roots = {child};
       ClassLoaderPolicy policy = new VFSClassLoaderPolicy(roots);
       URL url = policy.getResource("org/jboss/seam/debug/Contexts.class");
       log.info(url);
       assertNotNull(url);
    }
+
+   public List<Closeable> recursiveMount(VirtualFile file) throws IOException
+   {
+      ArrayList<Closeable> mounts = new ArrayList<Closeable>();
+
+      if (!file.isDirectory() && file.getName().matches("^.*\\.([EeWwJj][Aa][Rr]|[Zz][Ii][Pp])$"))
+         mounts.add(VFS.mountZipExpanded(file, file, provider));
+
+      if (file.isDirectory())
+         for (VirtualFile child : file.getChildren())
+            mounts.addAll(recursiveMount(child));
+
+      return mounts;
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -27,8 +27,8 @@
 import org.jboss.deployers.client.spi.Deployment;
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.test.deployers.OldAbstractDeploymentTest;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * A test that deploys everything in an EAR.
@@ -45,10 +45,10 @@
       File file = new File(deployDir);
       file = new File(file, "dir with spaces");
       URI contextName = file.toURI();
-      VFS vfs = VFS.getVFS(contextName);
+      VirtualFile contextFile = VFS.getChild(contextName);
       
       // Create the deployment
-      VirtualFile vf = vfs.getChild("spaces.ear");
+      VirtualFile vf = contextFile.getChild("spaces.ear");
       assertNotNull(vf);
       Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(vf);
 

Modified: trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -38,8 +38,8 @@
 import org.jboss.profileservice.spi.DeploymentOption;
 import org.jboss.profileservice.spi.NoSuchDeploymentException;
 import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Basic DeploymentManager test.
@@ -100,6 +100,15 @@
       }
       catch(Exception e)
       {
+         try
+         {
+            stopAndRemove(new String[] { deploymentName });
+         }
+         catch(Exception ne)
+         {
+            log.debug("failed to stop deployment ", ne);
+         }
+         
          log.debug("Failed ", e);
          throw e;
       }
@@ -243,8 +252,7 @@
          String deployed = start.getDeploymentID().getRepositoryNames()[0];
          
          // Delete the file manually
-         VFS.init();
-         VirtualFile f = VFS.getRoot(new URI(deployed));
+         VirtualFile f = VFS.getChild(new URI(deployed));
          assertTrue(deployed, f.exists());
          assertTrue("deleted " + deployed, f.delete());
          

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -36,7 +36,6 @@
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
@@ -136,8 +135,6 @@
       ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
       ManagementView activeView = ps.getViewManager();
       activeView.load();
-      // Init the VFS to setup the vfs* protocol handlers
-      VFS.init();    
       return activeView;
    }
    
@@ -155,8 +152,6 @@
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          deployMgr = ps.getDeploymentManager();
          deployMgr.loadProfile(getProfileKey());
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       return deployMgr;
    }

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -41,7 +41,6 @@
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
@@ -189,8 +188,6 @@
          InitialContext ctx = getInitialContext();
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       // Reload
       activeView.load();
@@ -210,8 +207,6 @@
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          deployMgr = ps.getDeploymentManager();
          deployMgr.loadProfile(getProfileKey());
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       return deployMgr;
    }

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -86,7 +86,7 @@
       // TODO - hack to get off JDK's url handling
       String urlString = contentURL.toExternalForm();
       int p = urlString.indexOf(":/");
-      contentURL = new URL("vfszip" + urlString.substring(p));
+      contentURL = new URL("file" + urlString.substring(p));
       getLog().debug(contentURL);
 
       DeploymentStatus status;

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -217,7 +217,7 @@
       Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("WAR", "Context"));
       for (ManagedComponent comp : comps)
       {
-         if (comp.getDeployment().getName().endsWith("jmx-console.war/"))
+         if (comp.getDeployment().getName().endsWith("jmx-console.war"))
          {
             assertEquals("/jmx-console", ((SimpleValue)comp.getProperty("contextRoot").getValue()).getValue());
             return;

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -157,26 +157,26 @@
          "conf/bootstrap/jmx.xml",
          "conf/bootstrap/profile.xml", 
          "conf/jboss-service.xml",
-         "deployers/jbossweb.deployer/",
+         "deployers/jbossweb.deployer",
     		"deployers/ear-deployer-jboss-beans.xml",
-    		"deployers/jbossws.deployer/",
+    		"deployers/jbossws.deployer",
     		"deployers/ejb-deployer-jboss-beans.xml",
-    		"deployers/ejb3.deployer/",
-    		"deployers/jboss-aop-jboss5.deployer/",
+    		"deployers/ejb3.deployer",
+    		"deployers/jboss-aop-jboss5.deployer",
     		"deployers/security-deployer-jboss-beans.xml",
-    		"deployers/jboss-jca.deployer/",
+    		"deployers/jboss-jca.deployer",
     		"deploy/hsqldb-ds.xml",
-    		"deploy/jboss-local-jdbc.rar/",
-    		"deploy/jboss-xa-jdbc.rar/",
+    		"deploy/jboss-local-jdbc.rar",
+    		"deploy/jboss-xa-jdbc.rar",
     		"deploy/jca-jboss-beans.xml",
          "deploy/messaging/connection-factories-service.xml",
          "deploy/messaging/destinations-service.xml",
-    		"deploy/jms-ra.rar/",
+    		"deploy/jms-ra.rar",
     		"deploy/jmx-invoker-service.xml",
-    		"deploy/jmx-remoting.sar/",
+    		"deploy/jmx-remoting.sar",
     		"deploy/jsr88-service.xml",
     		"deploy/mail-service.xml",
-    		"deploy/ROOT.war/"
+    		"deploy/ROOT.war"
       };
       TreeSet<String> missingNames = new TreeSet<String>();
       for (String name : expectedNames)

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -407,7 +407,7 @@
       // create a URL for the resource.
       String contentURLString = super.getResourceURL(resourcePath);
       int index = contentURLString.indexOf(":/");
-      URL contentURL = new URL("vfsfile" + contentURLString.substring(index));
+      URL contentURL = new URL("file" + contentURLString.substring(index));
 
       // distribute the resource deployment.
       DeploymentManager manager = super.getDeploymentManager();

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -44,7 +44,6 @@
 import org.jboss.profileservice.management.matchers.AliasMatcher;
 import org.jboss.profileservice.spi.ProfileService;
 import org.jboss.test.JBossTestCase;
-import org.jboss.virtual.VFS;
 
 /**
  * Tests of key server bean managed object views
@@ -272,8 +271,6 @@
          InitialContext ctx = getInitialContext();
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         // Init the VFS to setup the vfs* protocol handlers
-         VFS.init();
       }
       activeView.load();
       return activeView;

Modified: trunk/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -39,8 +39,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.test.util.SecurityProviderUtil;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.plugins.vfs.VirtualFileURLConnection;
+import org.jboss.vfs.VirtualFile;
 
 /** A test mbean service that reads input from an https url passed in
  to its readURL method.
@@ -149,22 +148,6 @@
       URL keyStoreURL = loader.getResource("META-INF/tst.keystore");
       if (keyStoreURL == null)
          throw new IOException("Failed to find resource tst.keystore");
-      if (keyStoreURL.getProtocol().equals("vfszip"))
-      {
-         VirtualFileURLConnection conn = (VirtualFileURLConnection) keyStoreURL.openConnection();
-         VirtualFile vf = conn.getContent();
-         InputStream is = vf.openStream();
-         File tmp = File.createTempFile("tst-", ".keystore");
-         tmp.deleteOnExit();
-         FileOutputStream fos = new FileOutputStream(tmp);
-         byte[] buffer = new byte[1024];
-         int bytes;
-         while ((bytes = is.read(buffer)) > 0)
-            fos.write(buffer, 0, bytes);
-         fos.close();
-         is.close();
-         keyStoreURL = tmp.toURL();
-      }
       log.debug("Setting javax.net.ssl.trustStore to: " + keyStoreURL.getPath());
       System.setProperty("javax.net.ssl.trustStore", keyStoreURL.getPath());
    }

Modified: trunk/testsuite/src/main/org/jboss/test/webservice/WebserviceTestBase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/WebserviceTestBase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/WebserviceTestBase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -21,15 +21,22 @@
  */
 package org.jboss.test.webservice;
 
+import java.io.Closeable;
+import java.net.URL;
+import java.util.ArrayList;
 import java.util.Hashtable;
-
+import java.util.List;
+import java.io.File;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.jboss.test.JBossTestCase;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.TempFileProvider;
 
 /** Common functionality for web services test cases.
  *
@@ -38,11 +45,28 @@
  */
 public class WebserviceTestBase extends JBossTestCase
 {
+   private final List<Closeable> handles = new ArrayList<Closeable>();	
+   private TempFileProvider provider;	
+	
    public WebserviceTestBase(String name)
    {
       super(name);
    }
 
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      provider = TempFileProvider.create("test", new ScheduledThreadPoolExecutor(2));
+   }
+
+   protected void tearDown() throws Exception
+   {
+      VFSUtils.safeClose(handles);
+      VFSUtils.safeClose(provider);
+      handles.clear();
+      super.tearDown();
+   }
+
    /**
     * Get the client's env context, see tracker [840598] for details
     */
@@ -70,4 +94,26 @@
       suite.addTest(new TestSuite(clazz));
       return getDeploySetup(suite, jarName);
    }
+
+   public void mountJars(String... jarNames) throws Exception
+   {
+      for(String jarName : jarNames) 
+      {
+          URL jarUrl = getURL(jarName);
+	      VirtualFile jarFile = VFS.getChild(jarUrl);
+          handles.add(VFS.mountZip(jarFile.getPhysicalFile(), jarFile, provider));
+      }
+   }
+   // Hack version that supports getting URLs for non-existent files (VFS mounts)
+   private URL getURL(String jarName) throws Exception
+   {
+      String deployDir = System.getProperty("jbosstest.deploy.dir");
+	  if (deployDir == null)
+	  {
+	     deployDir = "output/lib";
+      }
+	  String url = deployDir + "/" + jarName;
+	  File file = new File(url);
+      return file.toURL();
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExampleTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExampleTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExampleTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -27,6 +27,8 @@
 import javax.naming.InitialContext;
 import javax.xml.rpc.Service;
 
+import org.jboss.vfs.VFS;
+
 /** A test for the examples from the JBoss Admin Devel book.
  *
  * @author Thomas.Diesler at jboss.org
@@ -52,6 +54,7 @@
       super.setUp();
       if (helloPort == null)
       {
+         mountJars("ws4ee-admindevel.jar", "ws4ee-admindevel-client.jar");
          InitialContext iniCtx = getClientContext();
          Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
          helloPort = (Hello)service.getPort(Hello.class);
@@ -60,7 +63,6 @@
 
    public void testHelloString() throws Exception
    {
-
       String retStr = helloPort.helloString("Kermit");
       assertEquals("Hello Kermit!", retStr);
    }

Modified: trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExplodedExampleTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExplodedExampleTestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/admindevel/ExplodedExampleTestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -43,6 +43,7 @@
 
    public void testHelloString() throws Exception
    {
+      mountJars("ws4ee-admindevel.jar", "ws4ee-admindevel-client.jar");
       InitialContext iniCtx = getClientContext();
       Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
       Hello helloPort = (Hello)service.getPort(Hello.class);

Modified: trunk/testsuite/src/main/org/jboss/test/webservice/jbas5614/JBAS5614TestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/jbas5614/JBAS5614TestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/jbas5614/JBAS5614TestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -51,6 +51,7 @@
       super.setUp();
       if (port == null)
       {
+         mountJars("webservice-jbas5614.ear", "webservice-jbas5614.ear/webservice-jbas5614-client.jar");
          InitialContext iniCtx = getClientContext("jbossws-client");
          Object lookup = iniCtx.lookup("java:comp/env/service/HelloWorldService");
          log.info("Lookup: " + lookup + " [" + lookup.getClass() + "]");

Modified: trunk/testsuite/src/main/org/jboss/test/webservice/jbws309/JBWS309TestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/jbws309/JBWS309TestCase.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/jbws309/JBWS309TestCase.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -111,6 +111,7 @@
 
    public void testBasicSecuredServiceAccess() throws Exception
    {
+      mountJars("ws4ee-jbws309.jar", "ws4ee-jbws309-client.jar");
       InitialContext iniCtx = getClientContext();
       Service service = (Service)iniCtx.lookup("java:comp/env/service/BasicSecured");
       Organization endpoint = (Organization)service.getPort(new QName(nsURI, "BasicSecuredPort"), Organization.class);
@@ -169,6 +170,7 @@
 
    public void testRoleSecuredServiceAccess() throws Exception
    {
+      mountJars("ws4ee-jbws309.jar", "ws4ee-jbws309-client.jar");
       InitialContext iniCtx = getClientContext();
       Service service = (Service)iniCtx.lookup("java:comp/env/service/RoleSecured");
       Organization endpoint = (Organization)service.getPort(new QName(nsURI, "RoleSecuredPort"), Organization.class);

Modified: trunk/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -103,7 +103,7 @@
    <bean name="ProfileServicePersistenceDeployer" class="org.jboss.system.server.profileservice.persistence.deployer.ProfileServicePersistenceDeployer" />
 
 	<!-- A filter for excluding files from the scanner -->
-	<bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+	<bean name="DeploymentFilter" class="org.jboss.vfs.util.ExtensibleFilter">
 		<!-- Files starting with theses strings are ignored -->
 		<property name="prefixes">#,%,\,,.,_$</property>
 		<!-- Files ending with theses strings are ignored -->

Modified: trunk/testsuite/src/resources/test-configs/jaspi/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/jaspi/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/resources/test-configs/jaspi/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -25,7 +25,7 @@
    <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
        <property name="webInfLibFilter">
           <!-- We accept all .jar files in WEB-INF/lib -->
-          <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+          <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
              <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
           </bean>
        </property>

Modified: trunk/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -10,7 +10,7 @@
    <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
        <property name="webInfLibFilter">
           <!-- We accept all .jar files in WEB-INF/lib -->
-          <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+          <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
              <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
           </bean>
        </property>

Modified: trunk/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -10,7 +10,7 @@
    <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
        <property name="webInfLibFilter">
           <!-- We accept all .jar files in WEB-INF/lib -->
-          <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+          <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
              <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
           </bean>
        </property>

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -67,7 +67,8 @@
 import org.jboss.metadata.javaee.spec.Environment;
 import org.jboss.metadata.javaee.spec.LifecycleCallbackMetaData;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.ejb3.vfs.spi.VirtualFile;
+import org.jboss.ejb3.vfs.impl.vfs3.VirtualFileWrapper;
 import org.jboss.web.WebApplication;
 import org.jboss.web.tomcat.service.injection.TomcatInjectionUtils;
 import org.jboss.web.tomcat.service.injection.WebEJBHandler;
@@ -616,7 +617,7 @@
    public VirtualFile getRootFile()
    {
       if (unit instanceof VFSDeploymentUnit)
-         return ((VFSDeploymentUnit)unit).getRoot();
+         return new VirtualFileWrapper(((VFSDeploymentUnit)unit).getRoot());
       else
          return null;
    }

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/JBossContextConfig.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/JBossContextConfig.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/JBossContextConfig.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -117,7 +117,7 @@
 import org.jboss.metadata.web.spec.WelcomeFileListMetaData;
 import org.jboss.util.StringPropertyReplacer;
 import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.web.deployers.MergedJBossWebMetaDataDeployer;
 import org.jboss.web.deployers.ServletContainerInitializerDeployer;
 import org.jboss.web.tomcat.metadata.ContextMetaData;

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -38,11 +38,11 @@
 import org.jboss.metadata.web.spec.WebMetaData;
 import org.jboss.mx.util.ObjectNameFactory;
 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.SuffixMatchFilter;
 import org.jboss.web.deployers.AbstractWarDeployer;
 import org.jboss.web.deployers.AbstractWarDeployment;
 import org.jboss.web.tomcat.service.session.SessionIDGenerator;
@@ -432,8 +432,8 @@
                VirtualFileFilter tldFilter = new SuffixMatchFilter(".tld", VisitorAttributes.DEFAULT);
                for (URL url : urls)
                {
-                  VFS vfs = VFS.getVFS(url);
-                  VirtualFile metaInf = vfs.getChild("META-INF");
+                  VirtualFile virtualFile = VFS.getChild(url);
+                  VirtualFile metaInf = virtualFile.getChild("META-INF");
                   if (metaInf != null)
                   {
                      List<VirtualFile> tlds = metaInf.getChildren(tldFilter);

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -59,7 +59,8 @@
 import org.jboss.mx.util.MBeanServerLocator;
 import org.jboss.naming.NonSerializableFactory;
 import org.jboss.security.SecurityUtil;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.web.WebApplication;
 import org.jboss.web.deployers.AbstractWarDeployment;
 import org.jboss.web.tomcat.security.JaccContextValve;
@@ -235,7 +236,7 @@
 
       String docBase = depUnit.getAttachment("org.jboss.web.explicitDocBase", String.class);
       if (docBase == null)
-         docBase = warUrl.getFile();
+         docBase = VFS.getChild(warUrl).getPhysicalFile().getAbsolutePath();
 
       context.setDocBase(docBase);
 

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/VFSDirContext.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/VFSDirContext.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/VFSDirContext.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -49,7 +49,7 @@
 import org.apache.naming.resources.Resource;
 import org.apache.naming.resources.ResourceAttributes;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFS Directory Context implementation.
@@ -116,10 +116,6 @@
      * Release any resources allocated for this directory context.
      */
     public void release() {
-
-        if (base != null) {
-            base.close();
-        }
         base = null;
         super.release();
 

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/WarClassLoaderDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -37,7 +37,7 @@
 import org.jboss.metadata.common.jboss.LoaderRepositoryConfigMetaData;
 import org.jboss.metadata.common.jboss.LoaderRepositoryMetaData;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * The war deployment class loader deployer.

Modified: trunk/tomcat/src/resources/standalone/war-deployers-jboss-beans.xml
===================================================================
--- trunk/tomcat/src/resources/standalone/war-deployers-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/resources/standalone/war-deployers-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -10,7 +10,7 @@
    <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
        <property name="webInfLibFilter">
           <!-- We accept all .jar files in WEB-INF/lib -->
-          <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+          <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
              <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
           </bean>
        </property>

Modified: trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
===================================================================
--- trunk/tomcat/src/resources/war-deployers-jboss-beans.xml	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/tomcat/src/resources/war-deployers-jboss-beans.xml	2010-03-01 18:27:16 UTC (rev 101688)
@@ -10,7 +10,7 @@
    <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
        <property name="webInfLibFilter">
           <!-- We accept all .jar files in WEB-INF/lib -->
-          <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+          <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
              <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
           </bean>
        </property>

Modified: trunk/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java
===================================================================
--- trunk/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -23,7 +23,7 @@
 
 import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * .bsh file deployer.

Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -28,8 +28,8 @@
 import org.jboss.deployers.vfs.plugins.classloader.UrlIntegrationDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.util.StringPropertyReplacer;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.wsf.spi.management.ServerConfig;
 
 /**
@@ -78,7 +78,7 @@
          {
             String url = getServerHome() + file;
             url = StringPropertyReplacer.replaceProperties(url);
-            VirtualFile integrationLib = VFS.getRoot(new URL(url));
+            VirtualFile integrationLib = VFS.getChild(new URL(url));
 
             if (integrationLib != null && integrationLib.exists())
             {

Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -10,7 +10,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.webservices.integration.util.ASHelper;
 import org.jboss.wsf.common.ResourceLoaderAdapter;
 import org.jboss.wsf.spi.SPIProvider;
@@ -121,14 +121,7 @@
          for (VirtualFile vf : virtualFiles)
          {
             // Adding the roots of the virtual files.
-            try
-            {
-               uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
-            }
-            catch (IOException ioe)
-            {
-               throw new WSFDeploymentException(ioe);
-            }
+            uVirtualFiles.add(new VirtualFileAdaptor(vf)); // TODO: Figure out why this was using the VFS2 VFS root instead of the meta-data file itself.  
          }
          dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
       }

Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java	2010-03-01 18:25:28 UTC (rev 101687)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java	2010-03-01 18:27:16 UTC (rev 101688)
@@ -1,8 +1,8 @@
 package org.jboss.webservices.integration.deployers.deployment;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilterWithAttributes;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilterWithAttributes;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * WS file filter for files with the '.wsdl', or '.xsd' or '.xml' suffix. 




More information about the jboss-cvs-commits mailing list