[jboss-cvs] JBossAS SVN: r97032 - trunk/server/src/main/java/org/jboss/web/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 26 10:41:37 EST 2009
Author: remy.maucherat at jboss.com
Date: 2009-11-26 10:41:36 -0500 (Thu, 26 Nov 2009)
New Revision: 97032
Modified:
trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
Log:
- Shared SCIs that fail to classload should probably not cause everything to fail.
Modified: trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java 2009-11-26 14:54:08 UTC (rev 97031)
+++ trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java 2009-11-26 15:41:36 UTC (rev 97032)
@@ -104,23 +104,16 @@
{
for (URL jarURL : sciJars)
{
- try
+ VFS vfs = VFS.getVFS(jarURL);
+ VirtualFile sci = vfs.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
+ if (sci != null)
{
- VFS vfs = VFS.getVFS(jarURL);
- VirtualFile sci = vfs.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
- if (sci != null)
+ ServletContainerInitializer service = loadSci(unit, sci, jarURL.getPath(), false);
+ if (service != null)
{
- ServletContainerInitializer service = loadSci(unit, sci, jarURL.getPath());
- if (service != null)
- {
- scis.add(service);
- }
+ scis.add(service);
}
}
- catch (Exception e)
- {
- DeploymentException.rethrowAsDeploymentException("Deployment error scanning shared SCIs for JAR: " + jarURL.getPath(), e);
- }
}
}
// Find local ServletContainerInitializer services
@@ -135,7 +128,7 @@
VirtualFile sci = localScis.get(jar);
if (sci != null)
{
- ServletContainerInitializer service = loadSci(unit, sci, jar);
+ ServletContainerInitializer service = loadSci(unit, sci, jar, true);
if (service != null)
{
scis.add(service);
@@ -197,7 +190,8 @@
}
- private ServletContainerInitializer loadSci(DeploymentUnit unit, VirtualFile sci, String jar) throws DeploymentException
+ private ServletContainerInitializer loadSci(DeploymentUnit unit, VirtualFile sci, String jar, boolean error)
+ throws DeploymentException
{
ServletContainerInitializer service = null;
InputStream is = null;
@@ -218,7 +212,14 @@
}
catch (Exception e)
{
- DeploymentException.rethrowAsDeploymentException("Deployment error processing SCI for JAR: " + jar, e);
+ if (error)
+ {
+ DeploymentException.rethrowAsDeploymentException("Deployment error processing SCI for JAR: " + jar, e);
+ }
+ else
+ {
+ log.info("Skipped SCI for JAR: " + jar, e);
+ }
}
finally
{
More information about the jboss-cvs-commits
mailing list