You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2010/09/22 16:55:38 UTC
[jira] Created: (OWB-457) we must not create a SessionContext for
static resource reqeusts
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.
Re: [jira] Created: (OWB-457) we must not create a SessionContext for static resource reqeusts
Posted by Mark Struberg <st...@yahoo.de>.
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 <ke...@gmail.com> wrote:
> From: Rohit Kelapure <ke...@gmail.com>
> Subject: Re: [jira] Created: (OWB-457) we must not create a SessionContext for static resource reqeusts
> To: dev@openwebbeans.apache.org
> 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)
> <ji...@apache.org>
> 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.
> >
>
Re: [jira] Created: (OWB-457) we must not create a SessionContext for
static resource reqeusts
Posted by Rohit Kelapure <ke...@gmail.com>.
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) <ji...@apache.org> 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.
>
[jira] Resolved: (OWB-457) we must not create a SessionContext for
static resource reqeusts
Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg resolved OWB-457.
-------------------------------
Fix Version/s: 1.0.0-alpha-3
Resolution: Fixed
> 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: Mark Struberg
> Fix For: 1.0.0-alpha-3
>
> Attachments: OWB-457.patch, OWB-457_rohitk.patch
>
>
> 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.
[jira] Commented: (OWB-457) we must not create a SessionContext for
static resource reqeusts
Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914211#action_12914211 ]
Mark Struberg commented on OWB-457:
-----------------------------------
Hi Rohit!
I glimpsed over your patch and it looks good. While my code is smaller, yours is much more straight forward and as such more easy to maintain I think. Will apply it and do a bit testing.
txs and LieGrue,
strub
> 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: Mark Struberg
> Attachments: OWB-457.patch, OWB-457_rohitk.patch
>
>
> 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.
[jira] Updated: (OWB-457) we must not create a SessionContext for
static resource reqeusts
Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg updated OWB-457:
------------------------------
Attachment: OWB-457.patch
Work in progress! This patch introduces a LazySessionContext.
It will be used instead creating a fully blown Session.
The *real* SessionContext will only be created if a bean get's requested.
All this stuff needs tough testing though!
> 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: Mark Struberg
> Attachments: OWB-457.patch
>
>
> 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.
[jira] Updated: (OWB-457) we must not create a SessionContext for
static resource reqeusts
Posted by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rohit Dilip Kelapure updated OWB-457:
-------------------------------------
Attachment: OWB-457_rohitk.patch
Hi Mark,
I was also coding up a fix for this JIRA issue. I am attaching my patch for this issue which is still under test.
I took the approach of extending the RequestContext instead of the SessionContext.
If you see anything useful in my patch please steal it.
I have done some testing with my patch; however it is still a work in progress.
--Thanks,
Rohit Kelapure
> 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: Mark Struberg
> Attachments: OWB-457.patch, OWB-457_rohitk.patch
>
>
> 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.
[jira] Assigned: (OWB-457) we must not create a SessionContext for
static resource reqeusts
Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg reassigned OWB-457:
---------------------------------
Assignee: Mark Struberg (was: Gurkan Erdogdu)
> 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: Mark Struberg
>
> 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.