Sounds ok. I will also check if we are able to do a non-intrusive lazy-initialisation in the BeanManager itself. If this performs well, then I'd prefere it.
LieGrue, strub --- On Wed, 9/22/10, Rohit Kelapure <[email protected]> wrote: > From: Rohit Kelapure <[email protected]> > Subject: Re: [jira] Created: (OWB-457) we must not create a SessionContext > for static resource reqeusts > To: [email protected] > Date: Wednesday, September 22, 2010, 3:55 PM > An application could specify these > exclude paths or mime types as > context parameters in the web.xml > > <context-param> > > <param-name>OWB_SESSION_CONTEXT_EXCLUDE_PATH</param-name> > > <param-value>/openBooks/static/images/</param-value> > </context-param> > > <context-param> > > <param-name>OWB_SESSION_CONTEXT_EXCLUDE_MIME_TYPE</param-name> > <param-value>*.jpeg, *.gif > </param-value> > </context-param> > > OWB could pull this out in > WebBeansConfigurationListener.requestInitialized(ServletRequestEvent) > - > event.getServletContext().getInitParameter("OWB_SESSION_CONTEXT_EXCLUDE_MIME_TYPE"); > - > event.getServletContext().getInitParameter("OWB_SESSION_CONTEXT_EXCLUDE_PATH"); > > & compare with > - httpRequest.getContentType() > - httpRequest.getPathInfo(), httpRequest.getContextPath() > > > and NOT create the session context when the path/mime-type > in the > request matches the param values defined in the web.xml > > Does this proposal sound reasonable ? > > --Thanks, > Rohit > > > On Wed, Sep 22, 2010 at 10:55 AM, Mark Struberg (JIRA) > <[email protected]> > wrote: > > > > we must not create a SessionContext for static > resource reqeusts > > > ---------------------------------------------------------------- > > > > Key: OWB-457 > > URL: https://issues.apache.org/jira/browse/OWB-457 > > Project: OpenWebBeans > > Issue Type: Bug > > Reporter: Mark Struberg > > Assignee: Gurkan Erdogdu > > > > > > we currently trigger the creation of a new session in > WebBeansConfigurationListener#requestInitialized. > > > > This leads to unnecessarily creating tons of > SessionContexts if a static resource like an image gets > requested. > > > > We should seek a way to either configurably exclude > paths from this mechanism or to only create the > SessionContext if a SessionContext gets requested inside the > BeanManager > > > > -- > > This message is automatically generated by JIRA. > > - > > You can reply to this email to add a comment to the > issue online. > > >
