[jboss-cvs] JBossAS SVN: r94199 - in branches/JBPAPP_5_0: server/src/main/org/jboss/deployment and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 1 00:11:24 EDT 2009
Author: jason.greene at jboss.com
Date: 2009-10-01 00:11:22 -0400 (Thu, 01 Oct 2009)
New Revision: 94199
Modified:
branches/JBPAPP_5_0/component-matrix/pom.xml
branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/EARStructure.java
Log:
Fix JBPAPP-1740 - JBoss 5 Migration: deployer still deploys in alphabetical order
Modified: branches/JBPAPP_5_0/component-matrix/pom.xml
===================================================================
--- branches/JBPAPP_5_0/component-matrix/pom.xml 2009-10-01 03:58:28 UTC (rev 94198)
+++ branches/JBPAPP_5_0/component-matrix/pom.xml 2009-10-01 04:11:22 UTC (rev 94199)
@@ -64,7 +64,7 @@
<version.org.jboss.cluster.client>1.1.1.GA</version.org.jboss.cluster.client>
<version.org.jboss.cluster.server.api>1.1.1.GA</version.org.jboss.cluster.server.api>
<version.org.jboss.common.core>2.2.15.GA</version.org.jboss.common.core>
- <version.org.jboss.deployers>2.0.8.GA</version.org.jboss.deployers>
+ <version.org.jboss.deployers>2.0.8.SP1</version.org.jboss.deployers>
<version.org.jboss.ejb3.common.client>1.0.1</version.org.jboss.ejb3.common.client>
<version.org.jboss.ejb3.core.client>1.1.18</version.org.jboss.ejb3.core.client>
<version.org.jboss.ejb3.proxy.impl.client>1.0.5</version.org.jboss.ejb3.proxy.impl.client>
@@ -82,7 +82,7 @@
<version.org.jboss.logmanager>1.1.0.CR6</version.org.jboss.logmanager>
<version.org.jboss.man>2.1.1.GA</version.org.jboss.man>
<version.org.jboss.mdr>2.0.2.GA</version.org.jboss.mdr>
- <version.org.jboss.metadata>1.0.1.GA</version.org.jboss.metadata>
+ <version.org.jboss.metadata>1.0.1.SP1</version.org.jboss.metadata>
<version.org.jboss.microcontainer>2.0.9.GA</version.org.jboss.microcontainer>
<version.org.jboss.naming>5.0.3.GA</version.org.jboss.naming>
<version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
Modified: branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/EARStructure.java
===================================================================
--- branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/EARStructure.java 2009-10-01 03:58:28 UTC (rev 94198)
+++ branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/EARStructure.java 2009-10-01 04:11:22 UTC (rev 94199)
@@ -29,10 +29,12 @@
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.structure.ContextInfo;
+import org.jboss.deployers.structure.spi.helpers.RelativeDeploymentContextComparator;
import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
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.jboss.JBossAppMetaData.ModuleOrder;
import org.jboss.metadata.ear.spec.AbstractModule;
import org.jboss.metadata.ear.spec.ConnectorModuleMetaData;
import org.jboss.metadata.ear.spec.EarMetaData;
@@ -82,7 +84,7 @@
/**
* Set the relative order to 1000 by default
- */
+ */
public EARStructure()
{
setRelativeOrder(1000);
@@ -190,7 +192,7 @@
{
if (libDir == null)
libDir = "lib";
-
+
// Add the ear lib contents to the classpath
if(trace)
log.trace("Checking for ear lib directory: "+libDir);
@@ -278,6 +280,7 @@
+ " module listed in application.xml is not a recognized deployment, .ear: "
+ file.getName());
}
+
}
catch (IOException e)
{
@@ -285,12 +288,23 @@
}
}
}
+
+ if (appMetaData.getModuleOrderEnum() == ModuleOrder.STRICT)
+ {
+ context.setComparatorClassName(RelativeDeploymentContextComparator.class.getName());
+ int i = 0;
+ for (ContextInfo ctx : structureContext.getMetaData().getContexts())
+ {
+ ctx.setRelativeOrder(i++);
+ }
+ }
}
+
valid = true;
}
catch(Exception e)
{
- throw new RuntimeException("Error determining structure: " + file.getName(), e);
+ throw new RuntimeException("Error determining structure: " + file.getName(), e);
}
return valid;
@@ -332,7 +346,7 @@
for (VirtualFile vfArchive : archives)
{
String filename = earRelativePath(earPath, vfArchive.getPathName());
- // Check if the module already exists, i.e. it is declared in jboss-app.xml
+ // Check if the module already exists, i.e. it is declared in jboss-app.xml
ModuleMetaData moduleMetaData = appMetaData.getModule(filename);
int type = typeFromSuffix(filename, vfArchive);
if (type >= 0 && moduleMetaData == null)
@@ -414,7 +428,7 @@
type = J2eeModuleMetaData.EJB;
}
}
-
+
return type;
}
@@ -447,12 +461,12 @@
{
this.comparatorClassName = comparatorClassName;
}
-
+
public void setUseValidation(boolean validateXml)
{
this.useValidation = validateXml;
}
-
+
public boolean isUseValidation()
{
return useValidation;
More information about the jboss-cvs-commits
mailing list