[jboss-cvs] JBossAS SVN: r81743 - trunk/tomcat/src/main/org/jboss/web/jsf/integration/config.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 27 12:24:06 EST 2008
Author: remy.maucherat at jboss.com
Date: 2008-11-27 12:24:06 -0500 (Thu, 27 Nov 2008)
New Revision: 81743
Modified:
trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java
Log:
- Only call contextDestroyed if contextInitialized was fully performed (if not, an NPE occurs).
Modified: trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java 2008-11-27 17:07:11 UTC (rev 81742)
+++ trunk/tomcat/src/main/org/jboss/web/jsf/integration/config/JBossJSFConfigureListener.java 2008-11-27 17:24:06 UTC (rev 81743)
@@ -48,6 +48,8 @@
private ServletContext servletContext;
+ private boolean initialized = false;
+
public static boolean warBundlesJSFImpl(ServletContext servletContext)
{
String bundledJSFImpl = servletContext.getInitParameter(WAR_BUNDLES_JSF_IMPL);
@@ -69,9 +71,19 @@
checkForMyFaces();
initializeJspRuntime();
+ initialized = true;
super.contextInitialized(event);
}
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (initialized)
+ {
+ initialized = false;
+ super.contextDestroyed(event);
+ }
+ }
+
// This method accounts for a peculiar problem with Jasper that pops up from time
// to time. In some cases, if the JspRuntimeContext is not loaded then the JspFactory
// will not be initialized for JSF. This method assures that it will always be
More information about the jboss-cvs-commits
mailing list