Details
Description
Currently, PicoServletContainerFilter forces use of a session. To me, this isn't necessarily a good practice for high scaling systems.
As far as I can see, there are a few things that should happen with this:
1 - We split things up into two filters. One that creates the session container, and one that creates the request. This would allow Session Nazi's to bypass the session container altogether.
2 - We do some sort of lazy initialization so if we have:
pico.as(WebCharateristics.SESSION).addComponent(MyObject.class);
Then when:
//No Session assert request.getSession(false) == null; pico.getComponent(MyObject.class); //Session Created assert request.getSession(false) != null;
In PicoServletContainerListener there is a makeScopedContainers() method.
It could be overridden to have session container point to the same reference as app container ?