[jboss-cvs] JBossAS SVN: r74350 - projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 10 06:04:12 EDT 2008


Author: alesj
Date: 2008-06-10 06:04:12 -0400 (Tue, 10 Jun 2008)
New Revision: 74350

Modified:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/PersistenceUnitDeployment.java
Log:
Handle vfszip as file.

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/PersistenceUnitDeployment.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/PersistenceUnitDeployment.java	2008-06-10 10:03:24 UTC (rev 74349)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/PersistenceUnitDeployment.java	2008-06-10 10:04:12 UTC (rev 74350)
@@ -221,6 +221,7 @@
       pi.setExcludeUnlistedClasses(metaData.isExcludeUnlistedClasses());
       VirtualFile root = di.getRootFile();
       log.debug("Persistence root: " + root);
+      // TODO - update this with VFSUtils helper method
       // hack the JPA url
       URL url = root.toURL();
       // is not nested, so direct VFS URL is not an option
@@ -228,7 +229,13 @@
       {
          String urlString = url.toExternalForm();
          if (urlString.startsWith("vfs"))
-            url = new URL(urlString.substring(3));
+         {
+            // treat vfszip as file
+            if (urlString.startsWith("vfszip"))
+               url = new URL("file" + urlString.substring(6));
+            else
+               url = new URL(urlString.substring(3)); // (vfs)file and (vfs)jar are ok
+         }
       }
       pi.setPersistenceUnitRootUrl(url);
       PersistenceUnitTransactionType transactionType = getJPATransactionType();




More information about the jboss-cvs-commits mailing list