Overhaul servlet initialization.
--------------------------------

                 Key: SHINDIG-51
                 URL: https://issues.apache.org/jira/browse/SHINDIG-51
             Project: Shindig
          Issue Type: Improvement
            Reporter: Kevin Brown
            Assignee: Kevin Brown
            Priority: Blocker


While doing work to implement the RpcServlet that has been discussed before 
(see https://issues.apache.org/jira/browse/SHINDIG-25), it became quite 
apparent that we can't do a whole lot more without fixing the gaping hole of 
servlet configuration (essentially, there's no way to use your own 
implementations of most of the core classes or inject your own javascript 
without either modifying GadgetRenderingServlet itself, or by using a servlet 
engine that allows for programmatic servlet creation).

I've attached a patch with a proposed solution (it also contains some minor 
performance tweaks and bug fixes that I was working on at the time, but nothing 
major). I don't really know if there's a cleaner way to do this or not since 
I'm not that familiar with the Servlet spec, but it seems to fit well within 
the model and will finally give us a place to inject implementation specific 
components without resorting to ugly hacks and workarounds.

This patch will break any existing hacky workaround type solutions, because it 
eliminates all of the constructors from all of the servlets, and instead 
configures the servlets the "proper" way by passing shared data through the 
ServletContext. This means that if I apply this patch, anyone who has done this 
sort of thing will need to change some code to make it work again. With that in 
mind, I'd prefer to send it here and let everyone review it before committing. 
This also removes some previously deprecated methods from GadgetServer which 
simply won't be needed in this model.

All feedback is appreciated.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to