webtier@glassfish.java.net

Re: jsf ri 1.2_12 bug with ConfigureListener contextDestroyed

From: <webtier_at_javadesktop.org>
Date: Wed, 03 Jun 2009 02:14:34 PDT

And I didn't find a branch for 1.2_12 into the svn and I cannot upgrade to jsf 2.0 yet any workaround possible ?

The code needed to change in the 1.2_12 is the following one :

 public void contextDestroyed(ServletContextEvent sce) {

                   if (webAppListener != null) {
   234 webAppListener.contextDestroyed(sce);
                   }
   235 webAppListener = null;
   236 ServletContext context = sce.getServletContext();
   237 GroovyHelper helper = GroovyHelper.getCurrentInstance(context);
   238 if (helper != null) {
   239 helper.setClassLoader();
   240 }
   241
   242 LOGGER.log(Level.FINE,
   243 "ConfigureListener.contextDestroyed({0})",
   244 context.getServletContextName());
   245
   246 try {
   247 // Release any allocated application resources
   248 FactoryFinder.releaseFactories();
   249 //monitor.cancel(true);
   250 //webResourcePool.purge();
   251 webResourcePool.shutdown();
   252 } finally {
   253 FacesContext initContext = new InitFacesContext(context);
   254 ApplicationAssociate
   255 .clearInstance(initContext.getExternalContext());
   256 ApplicationAssociate.setCurrentInstance(null);
   257 // Release the initialization mark on this web application
   258 ConfigManager.getInstance().destory(context);
   259 initContext.release();
   260 ReflectionUtils.clearCache(Thread.currentThread().getContextClassLoader());
   261 WebConfiguration.clear(context);
   262 }
   263
   264 }
[Message sent by forum member 'alexandre_jaquet' (alexandre_jaquet)]

http://forums.java.net/jive/thread.jspa?messageID=348861