[jboss-cvs] JBossAS SVN: r82238 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 11 19:52:30 EST 2008
Author: alesj
Date: 2008-12-11 19:52:30 -0500 (Thu, 11 Dec 2008)
New Revision: 82238
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
Log:
[JBDEPLOY-150]; use vfs cache.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java 2008-12-12 00:41:13 UTC (rev 82237)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java 2008-12-12 00:52:30 UTC (rev 82238)
@@ -26,6 +26,8 @@
import java.util.Collections;
import java.util.List;
import java.util.Set;
+import java.security.ProtectionDomain;
+import java.security.CodeSource;
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
import org.jboss.deployers.spi.DeploymentException;
@@ -121,7 +123,7 @@
{
for (URL integrationURL : integrationURLs)
{
- VirtualFile integration = VFS.getRoot(integrationURL);
+ VirtualFile integration = VFS.getCachedFile(integrationURL);
unit.addClassPath(integration);
added.add(integration);
}
@@ -148,7 +150,7 @@
{
try
{
- VirtualFile integration = VFS.getRoot(integrationURL);
+ VirtualFile integration = VFS.getCachedFile(integrationURL);
classPath.remove(integration);
}
catch (Throwable t)
@@ -160,6 +162,20 @@
}
/**
+ * Get the deployers location.
+ * Might be useful for integration url creation.
+ *
+ * @return the deployer's location
+ */
+ protected String getDeployerLocation()
+ {
+ ProtectionDomain pd = getClass().getProtectionDomain();
+ CodeSource cs = pd.getCodeSource();
+ URL location = cs.getLocation();
+ return location.toString();
+ }
+
+ /**
* Is unit integration deployment unit?
*
* @param unit the deployment unit
More information about the jboss-cvs-commits
mailing list