Guice Initialization Must Be Deferred Until Nuxeo Configuration Is Completed
----------------------------------------------------------------------------
Key: NXP-4906
URL: https://jira.nuxeo.org/browse/NXP-4906
Project: Nuxeo Enterprise Platform
Issue Type: Improvement
Reporter: Ian Smith
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets