[jboss-cvs] JBossAS SVN: r64338 - in trunk/server/src/main/org/jboss: web/deployers and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Jul 28 17:28:57 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-07-28 17:28:57 -0400 (Sat, 28 Jul 2007)
New Revision: 64338
Modified:
trunk/server/src/main/org/jboss/deployment/JBossWebAppParsingDeployer.java
trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
Log:
Move the ear metadata integration into the base war deployer
Modified: trunk/server/src/main/org/jboss/deployment/JBossWebAppParsingDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/JBossWebAppParsingDeployer.java 2007-07-28 21:18:17 UTC (rev 64337)
+++ trunk/server/src/main/org/jboss/deployment/JBossWebAppParsingDeployer.java 2007-07-28 21:28:57 UTC (rev 64338)
@@ -102,32 +102,6 @@
if (loaderConfig != null)
{
unit.addAttachment(LoaderRepositoryConfig.class, loaderConfig);
- }
-
- // Merge any settings from the ear level
- J2eeApplicationMetaData earMetaData = AttachmentLocator.search(unit, J2eeApplicationMetaData.class);
- if( earMetaData != null )
- {
- String path = unit.getRelativePath();
- J2eeModuleMetaData webModule = earMetaData.getModule(path);
- if( webModule != null )
- {
- // Check for a context-root setting
- String contextRoot = metaData.getContextRoot();
- if( contextRoot == null )
- {
- contextRoot = webModule.getWebContext();
- metaData.setContextRoot(contextRoot);
- }
-
- // Add any alt-dd setting
- metaData.setAltDDPath(webModule.getAlternativeDD());
- }
-
- // Merge security domain/roles
- if( metaData.getSecurityDomain() == null )
- metaData.setSecurityDomain(earMetaData.getSecurityDomain());
- metaData.mergeSecurityRoles(earMetaData.getSecurityRoles());
- }
+ }
}
}
Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java 2007-07-28 21:18:17 UTC (rev 64337)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java 2007-07-28 21:28:57 UTC (rev 64338)
@@ -35,9 +35,12 @@
import javax.management.ObjectName;
import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AttachmentLocator;
import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployment.J2eeApplicationMetaData;
+import org.jboss.deployment.J2eeModuleMetaData;
import org.jboss.metadata.WebMetaData;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.system.metadata.ServiceConstructorMetaData;
@@ -279,6 +282,32 @@
{
log.debug("Begin deploy, " + metaData);
+ // Merge any settings from the ear level
+ J2eeApplicationMetaData earMetaData = AttachmentLocator.search(unit, J2eeApplicationMetaData.class);
+ if( earMetaData != null )
+ {
+ String path = unit.getRelativePath();
+ J2eeModuleMetaData webModule = earMetaData.getModule(path);
+ if( webModule != null )
+ {
+ // Check for a context-root setting
+ String contextRoot = metaData.getContextRoot();
+ if( contextRoot == null )
+ {
+ contextRoot = webModule.getWebContext();
+ metaData.setContextRoot(contextRoot);
+ }
+
+ // Add any alt-dd setting
+ metaData.setAltDDPath(webModule.getAlternativeDD());
+ }
+
+ // Merge security domain/roles
+ if( metaData.getSecurityDomain() == null )
+ metaData.setSecurityDomain(earMetaData.getSecurityDomain());
+ metaData.mergeSecurityRoles(earMetaData.getSecurityRoles());
+ }
+
try
{
/* Unpack wars to the tmp directory for now until tomcat can use the vfs directly. Since
More information about the jboss-cvs-commits
mailing list