[seam-commits] Seam SVN: r9163 - in trunk/src/main: org/jboss/seam/init and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Oct 1 13:13:25 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-10-01 13:13:25 -0400 (Wed, 01 Oct 2008)
New Revision: 9163
Modified:
trunk/src/main/META-INF/seam-deployment.properties
trunk/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-3481
Modified: trunk/src/main/META-INF/seam-deployment.properties
===================================================================
--- trunk/src/main/META-INF/seam-deployment.properties 2008-10-01 15:58:12 UTC (rev 9162)
+++ trunk/src/main/META-INF/seam-deployment.properties 2008-10-01 17:13:25 UTC (rev 9163)
@@ -1 +1,2 @@
-org.jboss.seam.deployment.deploymentHandlers=org.jboss.seam.bpm.PageflowDeploymentHandler
\ No newline at end of file
+org.jboss.seam.deployment.deploymentHandlers=org.jboss.seam.bpm.PageflowDeploymentHandler
+org.jboss.seam.init.duplicateJarsPatterns=^(\\S*)(tmp\\d+\\S*.jar)(\\S*)$
\ No newline at end of file
Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java 2008-10-01 15:58:12 UTC (rev 9162)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java 2008-10-01 17:13:25 UTC (rev 9163)
@@ -43,6 +43,7 @@
import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Init;
import org.jboss.seam.deployment.HotDeploymentStrategy;
+import org.jboss.seam.deployment.SeamDeploymentProperties;
import org.jboss.seam.deployment.StandardDeploymentStrategy;
import org.jboss.seam.deployment.WarRootDeploymentStrategy;
import org.jboss.seam.exception.Exceptions;
@@ -67,6 +68,8 @@
{
public static final String COMPONENT_NAMESPACE = "http://jboss.com/products/seam/components";
public static final String COMPONENT_SUFFIX = ".component";
+ public static final String DUPLICATE_JARS_PATTERNS = "org.jboss.seam.init.duplicateJarsPatterns";
+
private static final LogProvider log = Logging.getLogProvider(Initialization.class);
private ServletContext servletContext;
@@ -135,17 +138,30 @@
}
Properties replacements = getReplacements();
+ List<String> duplicateJarPatterns = new SeamDeploymentProperties(Thread.currentThread().getContextClassLoader()).getPropertyValues(DUPLICATE_JARS_PATTERNS);
while (resources.hasMoreElements())
{
URL url = resources.nextElement();
- try
+ boolean skip = false;
+ for (String regex : duplicateJarPatterns)
{
- log.info("reading " + url);
- installComponentsFromXmlElements( XML.getRootElement( url.openStream() ), replacements );
+ String path = url.getPath();
+ if (path.matches(regex))
+ {
+ skip = true;
+ }
}
- catch (Exception e)
+ if (!skip)
{
- throw new RuntimeException("error while reading " + url, e);
+ try
+ {
+ log.info("reading " + url);
+ installComponentsFromXmlElements( XML.getRootElement( url.openStream() ), replacements );
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("error while reading " + url, e);
+ }
}
}
More information about the seam-commits
mailing list