Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2065

Web container needs to call javax.faces.FactoryFinder.releaseFactories() at undeployment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Minor
    • None
    • JBossAS-4.0.3RC1
    • Web (Tomcat) service
    • None

    Description

      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.

      Attachments

        Activity

          People

            ssilvert@redhat.com Stan Silvert
            ssilvert@redhat.com Stan Silvert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: