Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-4906

Guice Initialization Must Be Deferred Until Nuxeo Configuration Is Completed

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.3 GA
    • Fix Version/s: 5.3.1
    • Component/s: None

      Description

      The normal way guice-based servlets work is by having a ServletContextListener. In our opensocial server (nuxeo-opensocial-server) we have one of these called GuiceContextListener that does the work to set up all the bindings for Guice. This context listener must run PRIOR to any of the shindig code running, since most of it requires Guice for injection. In particular, the AuthenticationServletFilter is created quite early in process and as such guice has to run before servlet filters are installed by the web container.

      On JBOSS the web container initialization occurs before nuxeo has finished initailization--and so user configuration via contribution to extension points is not possible to affect the outcome of Guice (and thus shindig). However, on jetty the web container initialization occurs AFTER nuxeo has completed all of its contrbutions to extension points.

      This makes it hard to have an xml file in the config directory that controls features of the opensocial dashboard.

      Thus, we need to defer the guice initialization (in the JBOSS case) until after we have finished all contributions to extension points. So, the two classes that are created by the Web container were wrapped with a "delaying wrapper" which prevents them from running until the nuxeo system is fully ready.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: