[jboss-cvs] JBossAS SVN: r101304 - in branches/vfs3-int: component-matrix and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 22 22:30:29 EST 2010


Author: johnbailey
Date: 2010-02-22 22:30:28 -0500 (Mon, 22 Feb 2010)
New Revision: 101304

Modified:
   branches/vfs3-int/build/build.xml
   branches/vfs3-int/component-matrix/pom.xml
   branches/vfs3-int/ejb3/pom.xml
   branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java
   branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java
   branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
   branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
   branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java
Log:
Integrated EJB3 VFS abstraction layer into AS

Modified: branches/vfs3-int/build/build.xml
===================================================================
--- branches/vfs3-int/build/build.xml	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/build/build.xml	2010-02-23 03:30:28 UTC (rev 101304)
@@ -1962,6 +1962,8 @@
       <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.vfs:vfs-spi:jar"/>
+      <fileset refid="org.jboss.ejb3.vfs: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"/>

Modified: branches/vfs3-int/component-matrix/pom.xml
===================================================================
--- branches/vfs3-int/component-matrix/pom.xml	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/component-matrix/pom.xml	2010-02-23 03:30:28 UTC (rev 101304)
@@ -85,7 +85,8 @@
     <version.org.jboss.deployers>2.2.0.Alpha2</version.org.jboss.deployers>
     <version.org.jboss.ejb3>1.0.4</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.1-SNAPSHOT</version.org.jboss.ejb3.core.client>
+    <version.org.jboss.ejb3.core.client>1.2.2</version.org.jboss.ejb3.core.client>
+    <version.org.jboss.ejb3.vfs3>1.0.0-SNAPSHOT</version.org.jboss.ejb3.vfs3>
     <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.jpa.int>2.0.0-alpha-1</version.org.jboss.ejb3.jpa.int>
@@ -99,7 +100,7 @@
 	<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.2-SNAPSHOT</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>
@@ -107,7 +108,7 @@
     <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-SNAPSHOT</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>
@@ -1982,8 +1983,23 @@
           </exclusion>
         </exclusions>
       </dependency>
-      
       <dependency>
+        <groupId>org.jboss.ejb3.vfs</groupId>
+        <artifactId>vfs-spi</artifactId>
+        <version>${version.org.jboss.ejb3.vfs3}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.ejb3.vfs</groupId>
+        <artifactId>vfs-impl-vfs3</artifactId>
+        <version>${version.org.jboss.ejb3.vfs3}</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>

Modified: branches/vfs3-int/ejb3/pom.xml
===================================================================
--- branches/vfs3-int/ejb3/pom.xml	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/ejb3/pom.xml	2010-02-23 03:30:28 UTC (rev 101304)
@@ -268,8 +268,23 @@
         	<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>vfs-impl-vfs3</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
 
     <dependency>
       <groupId>org.jboss.javaee</groupId>

Modified: branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java
===================================================================
--- branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java	2010-02-23 03:30:28 UTC (rev 101304)
@@ -59,7 +59,7 @@
 import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
 import org.jboss.metadata.javaee.spec.RemoteEnvironment;
 import org.jboss.util.NotImplementedException;
-import org.jboss.vfs.VirtualFile;
+import org.jboss.virtual.VirtualFile;
 
 /**
  * Injection of the application client main class is handled from here.

Modified: branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java
===================================================================
--- branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/clientmodule/ClientENCInjectionContainer.java	2010-02-23 03:30:28 UTC (rev 101304)
@@ -67,7 +67,7 @@
 import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
 import org.jboss.metadata.serviceref.ServiceReferenceHandler;
 import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.vfs.VirtualFile;
+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 = new VirtualFileAdaptor(getRootFile().getWrapped());
                      new ServiceReferenceHandler().bindServiceRef(encCtx, encName, vfsRoot, getClassloader(), sref);
 
                   }

Modified: branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
===================================================================
--- branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2010-02-23 03:30:28 UTC (rev 101304)
@@ -122,7 +122,7 @@
    public void register(Ejb3Deployment deployment)
    {
       // Create the path name relative to the root
-      String pathName = deployment.getDeploymentUnit().getRootFile().getPathName();
+      String pathName = deployment.getDeploymentUnit().getRootFile().getWrapped().getPathName();
       if(pathName.startsWith(shortName))
       {
          if(pathName.length() > shortName.length())
@@ -135,7 +135,7 @@
 
    public void unregister(Ejb3Deployment deployment)
    {
-      String pathName = deployment.getDeploymentUnit().getRootFile().getPathName();
+      String pathName = deployment.getDeploymentUnit().getRootFile().getWrapped().getPathName();
       if(pathName.startsWith(shortName))
          pathName = pathName.substring(shortName.length()+1);
       deployments.remove(pathName);

Modified: branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2010-02-23 03:30:28 UTC (rev 101304)
@@ -24,6 +24,7 @@
 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;
@@ -32,8 +33,9 @@
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
+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.VirtualFileFilter;
 import org.jboss.vfs.VisitorAttributes;
 import org.jboss.vfs.util.FilterVirtualFileVisitor;
 import org.jboss.vfs.util.SuffixesExcludeFilter;
@@ -79,9 +81,9 @@
       return unit.removeAttachment(name);
    }
 
-   public VirtualFile getRootFile()
+   public org.jboss.virtual.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.virtual.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.virtual.VirtualFile> getResources(org.jboss.virtual.VirtualFileFilter filter)
    {
       List<VirtualFile> classPath = unit.getClassPath();
       if(classPath == null || classPath.isEmpty())
@@ -213,7 +215,7 @@
       va.setLeavesOnly(true);
       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.virtual.VirtualFile> wrappedMatches = new ArrayList<org.jboss.virtual.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: branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java
===================================================================
--- branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java	2010-02-23 03:27:11 UTC (rev 101303)
+++ branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/service/TomcatInjectionContainer.java	2010-02-23 03:30:28 UTC (rev 101304)
@@ -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.vfs.VirtualFile;
+import org.jboss.virtual.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;
@@ -598,7 +599,7 @@
    public VirtualFile getRootFile()
    {
       if (unit instanceof VFSDeploymentUnit)
-         return ((VFSDeploymentUnit)unit).getRoot();
+         return new VirtualFileWrapper(((VFSDeploymentUnit)unit).getRoot());
       else
          return null;
    }




More information about the jboss-cvs-commits mailing list