Modify ICEpushResourceHandler to use the extension mechanism (ExtensionRegistry) to load the MainServlet either from ICEpush or MOBI depending on what is available in the classpath.
Used ExtensionRegistry to load the correct MainServlet. Delayed MAinServlet instantiation to allow for the extensions to register during context startup. Lookup PushContext on each PortableRenderer.push call to avoid NPEs during startup. Updated ICepush library to revision 24319.
Mircea Toma
added a comment - Used ExtensionRegistry to load the correct MainServlet. Delayed MAinServlet instantiation to allow for the extensions to register during context startup. Lookup PushContext on each PortableRenderer.push call to avoid NPEs during startup. Updated ICepush library to revision 24319.
NPE is triggered during application startup because ICEpushResourceHandler tries to access the PushContext during 'restore view' phase but PushContext is initialized only before 'render view' phase.
The fix changes MainServlet initialization to be performed before 'restore view' phase instead of before 'render view' phase.
Mircea Toma
added a comment - NPE is triggered during application startup because ICEpushResourceHandler tries to access the PushContext during 'restore view' phase but PushContext is initialized only before 'render view' phase.
The fix changes MainServlet initialization to be performed before 'restore view' phase instead of before 'render view' phase.
Used ExtensionRegistry to load the correct MainServlet. Delayed MAinServlet instantiation to allow for the extensions to register during context startup. Lookup PushContext on each PortableRenderer.push call to avoid NPEs during startup. Updated ICepush library to revision 24319.