[jboss-cvs] JBossAS SVN: r99011 - in projects/jpa/branches/vfs3-int/deployers: src/main/java/org/jboss/jpa/deployment and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 4 20:02:13 EST 2010
Author: johnbailey
Date: 2010-01-04 20:02:12 -0500 (Mon, 04 Jan 2010)
New Revision: 99011
Modified:
projects/jpa/branches/vfs3-int/deployers/pom.xml
projects/jpa/branches/vfs3-int/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java
projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/common/PersistenceTestCase.java
projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/deployment/DeploymentTestCase.java
projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/ejbthree893/SessionFactoryNameTestCase.java
projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/jbas6111/SecondLevelCacheRegionPrefixTestCase.java
projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/parsing/ParsingTestCase.java
projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/resolvers/DefaultPersistenceUnitDependencyResolverTestCase.java
Log:
[JBAS-7366] - Initial VFS3 integration for jpa-deployers
Modified: projects/jpa/branches/vfs3-int/deployers/pom.xml
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/pom.xml 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/pom.xml 2010-01-05 01:02:12 UTC (rev 99011)
@@ -21,10 +21,21 @@
</description>
<properties>
- <version.org.jboss.deployers>2.0.5.GA</version.org.jboss.deployers>
+ <version.org.jboss.deployers>2.2.0-SNAPSHOT</version.org.jboss.deployers>
+ <version.org.jboss.logging>2.2.0.CR1</version.org.jboss.logging>
</properties>
<dependencies>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.2.0.CR1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <version>2.2.0.CR1</version>
+ </dependency>
<!-- For 'mocking' a TransactionManager we use JBossTS -->
<dependency>
<groupId>jboss.jbossts</groupId>
@@ -90,8 +101,8 @@
</dependency>
<dependency>
<groupId>org.jboss.metadata</groupId>
- <artifactId>jboss-metadata</artifactId>
- <version>1.0.0.CR17</version>
+ <artifactId>jboss-metadata-ejb</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
@@ -144,7 +155,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
- <version>2.2.11.GA</version>
+ <version>2.2.17.GA</version>
</dependency>
</dependencies>
Modified: projects/jpa/branches/vfs3-int/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -49,8 +49,8 @@
import org.jboss.logging.Logger;
import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
import org.jboss.util.naming.NonSerializableFactory;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
/**
* Comment
@@ -152,16 +152,9 @@
protected VirtualFile getPersistenceUnitRoot()
{
// FIXME: What is the correct way to find the persistence unit root?
- try
- {
- VirtualFile metaData = di.getMetaDataFile("persistence.xml");
- assert metaData != null : "Can't find persistence.xml in " + di;
- return metaData.getParent().getParent();
- }
- catch(IOException e)
- {
- throw new RuntimeException(e);
- }
+ VirtualFile metaData = di.getMetaDataFile("persistence.xml");
+ assert metaData != null : "Can't find persistence.xml in " + di;
+ return metaData.getParent().getParent();
}
public EntityManagerFactory getContainerEntityManagerFactory()
@@ -288,8 +281,8 @@
VirtualFile root = getPersistenceUnitRoot();
log.debug("Persistence root: " + root);
- // hack the JPA url
- URL url = VFSUtils.getCompatibleURL(root);
+
+ URL url = root.toURL();
PersistenceUnitInfoImpl pi = new PersistenceUnitInfoImpl(metaData, props, di.getClassLoader(), url, jarFiles, initialContext);
if (explicitEntityClasses.size() > 0)
Modified: projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/common/PersistenceTestCase.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/common/PersistenceTestCase.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/common/PersistenceTestCase.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -21,14 +21,14 @@
*/
package org.jboss.jpa.deployers.test.common;
-import java.io.IOException;
+import java.net.URISyntaxException;
import java.net.URL;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -60,7 +60,7 @@
delegate.deploy("/org/jboss/jpa/deployers/test/common/jpa-deployers-beans.xml");
}
- protected void deploy(String spec) throws DeploymentException, IOException
+ protected void deploy(String spec) throws DeploymentException, URISyntaxException
{
URL url = getClass().getResource(spec);
if(url == null)
@@ -68,7 +68,7 @@
deploy(url);
}
- protected void deploy(String root, String deploymentName) throws DeploymentException, IOException
+ protected void deploy(String root, String deploymentName) throws DeploymentException, URISyntaxException
{
URL url = getClass().getResource(root);
if(url == null)
@@ -76,17 +76,16 @@
deploy(url, deploymentName);
}
- protected static void deploy(URL url) throws DeploymentException, IOException
+ protected static void deploy(URL url) throws DeploymentException, URISyntaxException
{
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.getChild(url);
VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
delegate.getMainDeployer().deploy(deployment);
}
- protected static void deploy(URL rootURL, String deploymentName) throws DeploymentException, IOException
+ protected static void deploy(URL rootURL, String deploymentName) throws DeploymentException, URISyntaxException
{
- VFS context = VFS.getVFS(rootURL);
- VirtualFile file = context.getRoot().getChild(deploymentName);
+ VirtualFile file = VFS.getChild(rootURL).getChild(deploymentName);
VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
delegate.getMainDeployer().deploy(deployment);
}
Modified: projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/deployment/DeploymentTestCase.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/deployment/DeploymentTestCase.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/deployment/DeploymentTestCase.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -40,8 +40,8 @@
import org.jboss.jpa.spi.PersistenceUnitRegistry;
import org.jboss.metadata.jpa.spec.PersistenceMetaData;
import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.junit.Test;
/**
@@ -55,7 +55,7 @@
{
String spec = "/org/jboss/jpa/deployers/test/deployment/pu";
URL url = getClass().getResource(spec);
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.getChild(url);
VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
delegate.getMainDeployer().deploy(deployment);
//delegate.getMainDeployer().checkComplete(deployment);
@@ -79,7 +79,7 @@
{
String spec = "/org/jboss/jpa/deployers/test/deployment/unnamed";
URL url = getClass().getResource(spec);
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.getChild(url);
// Force an illegal set of meta data
PersistenceUnitMetaData persistenceUnit = new PersistenceUnitMetaData();
Modified: projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/ejbthree893/SessionFactoryNameTestCase.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/ejbthree893/SessionFactoryNameTestCase.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/ejbthree893/SessionFactoryNameTestCase.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -33,8 +33,8 @@
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.jpa.deployers.test.common.MockRegionFactory;
import org.jboss.jpa.deployers.test.common.PersistenceTestCase;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.junit.After;
import org.junit.Test;
@@ -58,7 +58,7 @@
{
String spec = "/org/jboss/jpa/deployers/test/ejbthree893/pu";
URL url = getClass().getResource(spec);
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.getChild(url);
VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
delegate.getMainDeployer().deploy(deployment);
Modified: projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/jbas6111/SecondLevelCacheRegionPrefixTestCase.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/jbas6111/SecondLevelCacheRegionPrefixTestCase.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/jbas6111/SecondLevelCacheRegionPrefixTestCase.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -33,8 +33,8 @@
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.jpa.deployers.test.common.MockRegionFactory;
import org.jboss.jpa.deployers.test.common.PersistenceTestCase;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.junit.After;
import org.junit.Test;
@@ -58,7 +58,7 @@
{
String spec = "/org/jboss/jpa/deployers/test/jbas6111/pu";
URL url = getClass().getResource(spec);
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.getChild(url);
VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
delegate.getMainDeployer().deploy(deployment);
Modified: projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/parsing/ParsingTestCase.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/parsing/ParsingTestCase.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/parsing/ParsingTestCase.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -31,8 +31,8 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
import org.jboss.jpa.deployers.PersistenceParsingDeployer;
import org.jboss.metadata.jpa.spec.PersistenceMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.junit.Test;
/**
@@ -52,7 +52,7 @@
String common = "/org/jboss/jpa/deployers/test/parsing";
URL url = getClass().getResource(common);
assertNotNull(url);
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.getChild(url);
assertNotNull(file);
VFSDeploymentContext context = new AbstractVFSDeploymentContext(file, "");
Modified: projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/resolvers/DefaultPersistenceUnitDependencyResolverTestCase.java
===================================================================
--- projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/resolvers/DefaultPersistenceUnitDependencyResolverTestCase.java 2010-01-05 00:51:16 UTC (rev 99010)
+++ projects/jpa/branches/vfs3-int/deployers/src/test/java/org/jboss/jpa/deployers/test/resolvers/DefaultPersistenceUnitDependencyResolverTestCase.java 2010-01-05 01:02:12 UTC (rev 99011)
@@ -36,8 +36,8 @@
import org.jboss.jpa.resolvers.DefaultPersistenceUnitDependencyResolver;
import org.jboss.jpa.resolvers.strategy.SpecCompliantSearchStrategy;
import org.jboss.metadata.jpa.spec.PersistenceMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -60,7 +60,7 @@
String common = "/org/jboss/jpa/deployers/test";
URL url = DefaultPersistenceUnitDependencyResolverTestCase.class.getResource(common);
assertNotNull(url);
- VirtualFile root = VFS.getRoot(url);
+ VirtualFile root = VFS.getChild(url);
assertNotNull(root);
// Create some PersistenceMetaData
More information about the jboss-cvs-commits
mailing list