Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-163

Class ControllerObjectAccess should access FactoryManager on each request

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.0.1
    • unspecified
    • portlet container
    • None
    • Tomcat v5.0.28, JDK v.14

    Description

      The class ControllerObjectAccess accesses the controller factory implementation class via a static variable. When the factory manager gets re-initialized during a portal reload, this variable still holds the reference to the old factory manager as the reload does not affect the ControllerObjectAccess class itself.

      This may lead to strange classloader-related behavior (like classcast-exceptions) when the following is true:

      1. The portlet-api jar resides in a server location which will be served by a classloader which is a parent of each webapplication.
      2. The portal re-initializes the factory manager during an portal-application reload.
      3. The factory manager provides a controller factory implementation which utilizes classes from the portal application (and performs classloader-sensitive operations like instanceof-checks, casts, etc)

      I'm using the portal driver and have changed the FactoryManagerService.properties file to have my own controller factory being used by the portlet container.

      Due to the fact that this class resides in the distribution jar of the portlet container and this jar resides

      Attachments

        1. diff.patch
          0.9 kB
          Nico Max

        Activity

          People

            Unassigned Unassigned
            hanma0 Nico Max
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: