[seam-issues] [JBoss JIRA] Updated: (JBSEAM-4623) ServletContext is application scoped even though several can exist in one .ear

Kasper Sørensen (JIRA) jira-events at lists.jboss.org
Thu Apr 1 09:16:38 EDT 2010


     [ https://jira.jboss.org/jira/browse/JBSEAM-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kasper Sørensen updated JBSEAM-4623:
------------------------------------

    Attachment: multiple-servlet-contexts.patch


This is my proposed patch to solve this issue. It fixes it by implementing a ServletContext which delegates to several underlying ServletContexts. I don't know if this is the most elegant solution but it is backwards compatible and does the job. It is only used when several servlet contexts appear in the ServletLifeCycle class so it should not affect anyone who only has a single WAR file.

> ServletContext is application scoped even though several can exist in one .ear
> ------------------------------------------------------------------------------
>
>                 Key: JBSEAM-4623
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4623
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.1.CR1
>            Reporter: Kasper Sørensen
>         Attachments: multiple-servlet-contexts.patch
>
>
> When creating an .ear project with multiple .war files, several servlet contexts will exist, but Seam registers only a single servlet context in the application scope. This application scoped servlet context is used a lot of places through the ServletLifecycle class.
> To reproduce, try the following:
> ServletContext servletLifecycleServletContext = ServletLifecycle.getCurrentServletContext();
> ServletContext facesContextServletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
> This will return two different servlet contexts if called from the webapp that was not registered in application scope.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the seam-issues mailing list