[jboss-cvs] JBossAS SVN: r62791 - trunk/ejb3/src/main/org/jboss/ejb3/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 3 15:34:51 EDT 2007
Author: bdecoste
Date: 2007-05-03 15:34:51 -0400 (Thu, 03 May 2007)
New Revision: 62791
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
Log:
removed deprecated DeploymentUnit.getDeploymentContext() calls, which were causing duplicate deployments and breaking several persistence TCK tests
Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2007-05-03 17:47:55 UTC (rev 62790)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2007-05-03 19:34:51 UTC (rev 62791)
@@ -31,6 +31,7 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
+import org.jboss.logging.Logger;
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.VirtualFileFilter;
import org.jboss.virtual.VisitorAttributes;
@@ -46,6 +47,8 @@
*/
public class JBoss5DeploymentUnit implements org.jboss.ejb3.DeploymentUnit
{
+ private static final Logger log = Logger.getLogger(JBoss5DeploymentUnit.class);
+
private DeploymentUnit unit;
private InterceptorInfoRepository interceptorInfoRepository = new InterceptorInfoRepository();
private Map defaultPersistenceProperties;
@@ -57,7 +60,7 @@
public VirtualFile getRootFile()
{
- return unit.getDeploymentContext().getRoot();
+ return unit.getFile("");
}
public URL getRelativeURL(String jar)
@@ -75,7 +78,7 @@
if (getUrl() == null)
throw new RuntimeException("relative <jar-file> not allowed when standalone deployment unit is used");
String tmpjar = jar.substring(3);
- VirtualFile vf = unit.getDeploymentContext().getRoot().getParent().findChild(tmpjar);
+ VirtualFile vf = getRootFile().getParent().findChild(tmpjar);
return vf.toURL();
}
else
@@ -142,14 +145,14 @@
public String getShortName()
{
- return unit.getDeploymentContext().getRoot().getName();
+ return unit.getFile("").getName();
}
public URL getUrl()
{
try
{
- return unit.getDeploymentContext().getRoot().toURL();
+ return unit.getFile("").toURL();
}
catch (Exception e)
{
@@ -192,21 +195,17 @@
va.setRecurseFilter(noJars);
FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
- List<VirtualFile> classpath = unit.getDeploymentContext().getClassPath();
- if (classpath != null)
+ try
{
- for (VirtualFile vf : classpath)
- {
- try
- {
- vf.visit(visitor);
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
- }
+ getRootFile().visit(visitor);
}
- return visitor.getMatched();
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ List<VirtualFile> resources = visitor.getMatched();
+
+ return resources;
}
}
More information about the jboss-cvs-commits
mailing list