[jboss-cvs] JBossAS SVN: r94811 - in projects/metadata/branches/vfs3-int: src/main/java/org/jboss/metadata/serviceref and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 14 00:25:59 EDT 2009
Author: johnbailey
Date: 2009-10-14 00:25:57 -0400 (Wed, 14 Oct 2009)
New Revision: 94811
Modified:
projects/metadata/branches/vfs3-int/pom.xml
projects/metadata/branches/vfs3-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java
projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java
projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/serviceref/VFSAdaptorUnitTestCase.java
Log:
Integrated VFS3
Modified: projects/metadata/branches/vfs3-int/pom.xml
===================================================================
--- projects/metadata/branches/vfs3-int/pom.xml 2009-10-14 03:56:54 UTC (rev 94810)
+++ projects/metadata/branches/vfs3-int/pom.xml 2009-10-14 04:25:57 UTC (rev 94811)
@@ -121,7 +121,7 @@
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-spi</artifactId>
- <version>2.0.5.GA</version>
+ <version>2.2.0.CR1</version>
</dependency>
<dependency>
@@ -191,7 +191,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
- <version>2.0.0.CR1</version>
+ <version>3.0.0.CR1-SNAPSHOT</version>
</dependency>
<dependency>
Modified: projects/metadata/branches/vfs3-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java
===================================================================
--- projects/metadata/branches/vfs3-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java 2009-10-14 03:56:54 UTC (rev 94810)
+++ projects/metadata/branches/vfs3-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java 2009-10-14 04:25:57 UTC (rev 94811)
@@ -30,8 +30,8 @@
import java.util.LinkedList;
import java.util.List;
-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.deployment.UnifiedVirtualFile;
// $Id: VirtualFileAdaptor.java 4049 2007-08-01 11:26:30Z thomas.diesler at jboss.com $
@@ -87,8 +87,13 @@
{
if (file == null)
{
- VirtualFile root = VFS.getRoot(rootUrl);
- file = root.findChild(path);
+ VirtualFile root = null;
+ try {
+ root = VFS.getChild(rootUrl);
+ } catch (URISyntaxException e) {
+ throw new IOException("Unable to get VirtualFile for root URL: " + rootUrl, e);
+ }
+ file = root.getChild(path);
}
return file;
}
@@ -96,7 +101,7 @@
@SuppressWarnings("deprecation")
public UnifiedVirtualFile findChild(String child) throws IOException
{
- VirtualFile vf = getFile().findChild(child);
+ VirtualFile vf = getFile().getChild(child);
return new VirtualFileAdaptor(vf);
}
@@ -117,8 +122,7 @@
URL url = rootUrl;
if (url == null)
{
- VFS vfs = getFile().getVFS();
- url = vfs.getRoot().toURL();
+ url = VFS.getRootVirtualFile().toURL();
}
String pathName = path;
if (pathName == null)
Modified: projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java
===================================================================
--- projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java 2009-10-14 03:56:54 UTC (rev 94810)
+++ projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java 2009-10-14 04:25:57 UTC (rev 94811)
@@ -22,9 +22,7 @@
package org.jboss.test.metadata.javaee;
import java.lang.reflect.Method;
-import java.net.URL;
-import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.test.AbstractTestDelegate;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -41,9 +39,6 @@
*/
public class JBossXBTestDelegate extends AbstractTestDelegate
{
- /** Whether initialization has been done */
- private static boolean done = false;
-
/** The unmarshaller factory */
protected UnmarshallerFactory unmarshallerFactory;
@@ -54,24 +49,6 @@
protected boolean validateSchema = false;
/**
- * Initialize
- */
- public synchronized static void init()
- {
- if (done)
- return;
- done = true;
- URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory());
- URLStreamHandlerFactory.preload();
- String handlerPkgs = System.getProperty("java.protocol.handler.pkgs");
- if (handlerPkgs != null)
- handlerPkgs += "|org.jboss.net.protocol";
- else
- handlerPkgs = "org.jboss.net.protocol";
- System.setProperty("java.protocol.handler.pkgs", handlerPkgs);
- }
-
- /**
* Create a new JBossXBTestDelegate.
*
* @param clazz the test class
@@ -85,7 +62,6 @@
public void setUp() throws Exception
{
super.setUp();
- init();
unmarshallerFactory = UnmarshallerFactory.newInstance();
initResolver();
initValidateSchema();
Modified: projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/serviceref/VFSAdaptorUnitTestCase.java
===================================================================
--- projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/serviceref/VFSAdaptorUnitTestCase.java 2009-10-14 03:56:54 UTC (rev 94810)
+++ projects/metadata/branches/vfs3-int/src/test/java/org/jboss/test/metadata/serviceref/VFSAdaptorUnitTestCase.java 2009-10-14 04:25:57 UTC (rev 94811)
@@ -28,8 +28,8 @@
import org.jboss.metadata.serviceref.VirtualFileAdaptor;
import org.jboss.test.AbstractTestCaseWithSetup;
import org.jboss.test.AbstractTestDelegate;
-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.deployment.UnifiedVirtualFile;
/**
@@ -53,8 +53,8 @@
public void testVirtualFileAdaptor() throws Exception
{
URL url = getResource("/org/jboss/test/metadata");
- VirtualFile root = VFS.getRoot(url);
- VirtualFile jpa = root.findChild("jpa");
+ VirtualFile root = VFS.getChild(url);
+ VirtualFile jpa = root.getChild("jpa");
// direct vfs file
VirtualFileAdaptor adaptor = new VirtualFileAdaptor(jpa);
testVFSAdaptor(adaptor);
More information about the jboss-cvs-commits
mailing list