[jboss-jira] [JBoss JIRA] Commented: (JBAS-2065) Web container needs to call javax.faces.FactoryFinder.releaseFactories() at undeployment

Alexei Novikov (JIRA) jira-events at lists.jboss.org
Fri Jul 13 14:01:03 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBAS-2065?page=comments#action_12368917 ] 
            
Alexei Novikov commented on JBAS-2065:
--------------------------------------

Calling releaseFactories() by the MyFaces ServletContextListener does not actually release ClassLoaders because of this bug: http://issues.apache.org/jira/browse/MYFACES-1558

MyFaces FactoryFinder still holds references to ClassLoaders in a static hash map.

> Web container needs to call javax.faces.FactoryFinder.releaseFactories() at undeployment
> ----------------------------------------------------------------------------------------
>
>                 Key: JBAS-2065
>                 URL: http://jira.jboss.com/jira/browse/JBAS-2065
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Web (Tomcat) service
>    Affects Versions:  JBossAS-4.0.3RC1
>            Reporter: Stan Silvert
>         Assigned To: Stan Silvert
>            Priority: Minor
>
> Now that we have JSF integrated as part of the Web Container, there will only be one instance of javax.faces.FactoryFinder per JVM.  FactoryFinder provides a method called releaseFactories() which is intended to be used in situations where JSF is integrated as ours now is.  It dereferences the various per-app factories used.  These factories are stored in a Map that is keyed by the web app's context classloader.
> See http://java.sun.com/j2ee/javaserverfaces/1.1/docs/api/javax/faces/FactoryFinder.html#releaseFactories()
> Though I have not verified it, not calling releaseFactories() should cause a memory leak any time a JSF application is undeployed or redeployed.  Incidentally, this leak probably occurs 4.0.2 when two JSF applications use JBossWebLoader=true.
> To fix this according to the JSF spec, we should call FactoryFinder.releaseFactories() any time we undeploy a web application.  Of course, we would also need to make sure that the FactoryFinder class exists in case JSF is removed from JBoss AS.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list