[jboss-cvs] JBossAS SVN: r77433 - trunk/server/src/main/org/jboss/deployment.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 25 10:17:53 EDT 2008
Author: alesj
Date: 2008-08-25 10:17:52 -0400 (Mon, 25 Aug 2008)
New Revision: 77433
Modified:
trunk/server/src/main/org/jboss/deployment/EARStructure.java
Log:
Use Deployers 2.0.0.Beta21 code,
removing deprecated code.
Modified: trunk/server/src/main/org/jboss/deployment/EARStructure.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EARStructure.java 2008-08-25 14:09:33 UTC (rev 77432)
+++ trunk/server/src/main/org/jboss/deployment/EARStructure.java 2008-08-25 14:17:52 UTC (rev 77433)
@@ -27,10 +27,10 @@
import java.util.jar.Attributes;
import java.util.jar.Manifest;
+import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.structure.ContextInfo;
-import org.jboss.deployers.spi.structure.StructureMetaData;
import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSStructuralDeployers;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
import org.jboss.metadata.ear.jboss.JBossAppMetaData;
import org.jboss.metadata.ear.jboss.ServiceModuleMetaData;
import org.jboss.metadata.ear.spec.AbstractModule;
@@ -124,17 +124,18 @@
this.resolver = resolver;
}
- public boolean determineStructure(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData metaData, VFSStructuralDeployers deployers)
+ public boolean determineStructure(StructureContext structureContext) throws DeploymentException
{
ContextInfo context;
boolean valid;
boolean trace = log.isTraceEnabled();
+ VirtualFile file = structureContext.getFile();
try
{
if (file.isLeaf() == true || file.getName().endsWith(".ear") == false)
return false;
- context = createContext(file, "META-INF", metaData);
+ context = createContext(structureContext, "META-INF");
context.setComparatorClassName(comparatorClassName);
VirtualFile applicationXml = getMetaDataFile(file, "META-INF/application.xml");
@@ -194,14 +195,14 @@
List<VirtualFile> archives = lib.getChildren(earLibFilter);
for (VirtualFile archive : archives)
{
- super.addClassPath(root, archive, true, true, context);
+ addClassPath(structureContext, archive, true, true, context);
try
{
// add any jars with persistence.xml as a deployment
if (archive.getChild("META-INF/persistence.xml") != null)
{
log.trace(archive.getName() + " in ear lib directory has persistence units");
- if (deployers.determineStructure(root, file, archive, metaData) == false)
+ if (structureContext.determineChildStructure(archive) == false)
{
throw new RuntimeException(archive.getName()
+ " in lib directory has persistence.xml but is not a recognized deployment, .ear: "
@@ -229,7 +230,7 @@
}
// Add the ear manifest locations?
- super.addClassPath(root, file, includeEarRootInClasspath, true, context);
+ addClassPath(structureContext, file, includeEarRootInClasspath, true, context);
// TODO: need to scan for annotationss
if( scan )
@@ -257,7 +258,7 @@
throw new RuntimeException(fileName + " module listed in application.xml does not exist within .ear " + file.getName());
}
// Ask the deployers to analyze this
- if( deployers.determineStructure(root, file, module, metaData) == false )
+ if(structureContext.determineChildStructure(module) == false)
{
throw new RuntimeException(fileName
+ " module listed in application.xml is not a recognized deployment, .ear: "
@@ -417,7 +418,7 @@
{
metaFile = file.getChild(path);
}
- catch(IOException e)
+ catch(IOException ignored)
{
}
return metaFile;
More information about the jboss-cvs-commits
mailing list