I have an ear with two Seam wars inside. My setup mostly works
(still can't get rid of the 'There should only be one Seam phase listener per application' warning...),
but I ran into the following problem:
Each webapp has a startup component (@Observer for 'org.jboss.seam.postInitialization')
that does some work on startup. Since I have two webapp's, the postInitialization event
is raised twice, and, accordingly, my startup methods get called twice. The problem is
that one of those schedules some Quartz jobs and they get scheduled twice.
I have worked around the problem by checking for a certain name in application context
(one that only exists in one of the webapps), but that is not particularly pretty.
Is there a way to get the 'name' of the current app via the Seam API? Or maybe it should
be a parameter of the postInitialization event? I have tried to get the ServeltContext to
get to the context path, but that didn't work (there is an open JIRA, JBSEAM-1246).
Any suggesttions for a better way to do this are welcome.
Have you found the solution for this problem?