Hi devs,
Remote observation manager receive remote events and convert before
injecting it in a specific thread. For this to work properly as usual
the execution context need to be initialized for this thread.
Initialize ExecutionContext is pretty clean and component oriented but
we also need a stub XWikiContext initialized in the ExecutionContext.
I propose to implements a generic stib xwiki context initializer and
provider: the initializer react to ExecutionContextInitializer, when
receiving the first ExecutionContext initialization containing a
XWikiContext it call XWikiStubContextProvider.initialize to create a
XWiki context independent from the request but still containing
scheme/host/port information and when ExecutionContextInitializer is
called with a ExecutionContext which doe snot contains any
XWikiContext a clone of the stub XWikiContext is injected in the
Execution context.
To resume, it uses the first request generated XWikiContext to create
an XWikiContext independent form the request and use it to generate
default XWikiContext for thread not generated by the application
server when theses are initializing ExecutionContext.
WDYT ?
--
Thomas Mortagne