[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3119) Multiple WAR in EAR verification, example, and document

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Wed Apr 29 19:56:46 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12465111#action_12465111 ] 

Stuart Douglas commented on JBSEAM-3119:
----------------------------------------

The majority or multi war related issues are because the Lifecycle and ServletLifecycle classes both maintain a static reference to the servlet context (abstracted as a map in LifeCycle). This means that only one of the seam apps will have there application context stored in these classes. This seam app will work fine. The seam app that is not referenced has the following problems:

- Cannot load resource bundles due to use of the wrong ServletContext in
ServletLifecycle (or wrong bundles loaded).

- Timers and async methods started in the second app will be run in the
app context of the first

- The wrong identity component will be created by the IdentityFilter.

- The resource servlet for the second app is run the app context of the
first, and will not work

- Wicket integration for the second app will not work

- Spring integration will not work in the second app

- jbpm integration in the second app is broken.

To fix these issues I propose we introduce an application name context param in web.xml, and change LifeCycle and ServletLifecycle to hold a Map<application name, application/servlet context>. If the context param is not included then the application name is simply null. Lifecycle methods such as Lifecycle.beginCall will become Lifecycle.beginCall(String), and we can still keep the current api by changing the current beginCall method to delegate to beginCall(null), so single war apps will not notice any change. Inside the framework we need to store a reference to the appropriate application name when doing anything that accesses lifecycle methods. If a user includes two wars in an ear with the same application name (or no application name) an exception is thrown. For spring integration we can do things like

        <seam:instance name="someComponent" application="mySecondWarName" />

Does anyone have any comments/objections/reasons why this won't work?



> Multiple WAR in EAR verification, example, and document
> -------------------------------------------------------
>
>                 Key: JBSEAM-3119
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3119
>             Project: Seam
>          Issue Type: Feature Request
>          Components: Documentation Issues, Examples, Platform interoperability
>    Affects Versions: 2.1.0.A1
>            Reporter: Jay Balunas
>            Assignee: Shane Bryzak
>             Fix For: 2.2.0.CR1
>
>         Attachments: admin-dvdstore.diff, multi-war-wip-v2.diff, multi-war-wip.diff, multiple-wars.diff
>
>
> Create an example of two seam WAR applications inside of an EAR.  There has been quite a bit of forum traffic on the subject and it would be good to nail down an example and document.  There may also be errors and other issue that need to be worked out.
> An admin console type application to the standard booking application may be a good way to go.  It would be a real world/useful example.  

-- 
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