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

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Sun Apr 4 19:17:38 EDT 2010


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

Stuart Douglas closed JBSEAM-4623.
----------------------------------

    Resolution: Won't Fix


This is actually not an issue, as there are multiple application contexts.

The application scope is actually backed by the ServletContext, and if there are multiple wars in an ear then you end up with multiple instances of seam running alongside each other, with multiple application scopes. For more info have a look at the following:

http://lists.jboss.org/pipermail/seam-dev/2009-May/001338.html
https://jira.jboss.org/jira/browse/JBSEAM-3119

Seam 3 will share the application context across multiple wars, so this will not be an issue, and this behavior cannot be changed in a minor release.




> 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
>             Fix For: 2.2.1.CR2
>
>         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