[
https://jira.jboss.org/jira/browse/JBSEAM-3119?page=com.atlassian.jira.pl...
]
Stuart Douglas updated JBSEAM-3119:
-----------------------------------
Attachment: multi-war-appname1.diff
I have created a patch based on the application name approach I mentioned earlier
(multi-war-appname1.diff).
Each war in a multi-war seam app should specify a unique application name in the context
param 'org.jboss.seam.applicationName'.
Lifecycle.application now stores a static HashMap<String,Map<String,Object>>
ServletLifecycle.servletContext is now a HashMap<String,ServletContext>
All methods that used these statics now take the application name parameter. The original
methods have been kept as delegates to newMethod(null) . This means single war apps will
not be affected by the api change.
The application name is placed into the Application Context under the key
'org.jboss.seam.applicationName'. The lifecycle class contains a convenience
method Lifecycle.getApplicationName() that retrieves it.
I would appreciate it if a core seam dev could have a look at it and give me some
feedback. I have been thinking about this for a while and I think that the application
name approach is the only one that makes sense. Without this there is no way for external
users of seam components (such as spring) to specify which application they are actually
interested in.
Still to do:
Message driven beans do not work properly, they will always run in the context of the
application with a null name. I think the best we can do where is add an annotation to
specify the application context that we want the bean to be invoked in. In practice I
don't think this is a big issue.
Spring integration does not work properly in a multi-war app. It is only possible to
inject components from the application with a null name. This should be fairly easy to fix
by adding an applicationName parameter to the seam:instance namespace handler, but I do
not really know enough about spring.
Documentation - I am prepared to do this if the patch is accepted
Writing Tests
Lots of testing - This is a fairly invasive patch, and it would be good if people with
multi war projects could take it for a spin and see if there are any problems
Creating an example application
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-appname1.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