-
1. Re: Ear with multiple web modules - problem with components.
reind Jan 21, 2008 6:00 PM (in response to reind)Ugly workaround:
Everything works as expected if I:
1) start Jboss as normal
2) undeploy my ear (move it to a temp dir)
3) redeploy it (move it back into the deploy dir)
Note. for this to work I must also package those extra dummy jars (they only have 1 file - seam.properties).
But, if I just start JBoss normally, then the aforementioned problem occurs.
I've tried with both JBoss 4.2.2 and 4.2.0, and both have this problem.
That's obviously not a good solution =-). i'd appreciate any suggestions. -
2. Re: Ear with multiple web modules - problem with components.
pmuir Jan 22, 2008 8:10 AM (in response to reind)Can you report a JIRA issue and file a simple test case?
-
3. Re: Ear with multiple web modules - problem with components.
reind Jan 22, 2008 10:03 AM (in response to reind)Pete,
Thanks for the reply. I'm creating a test app now, and will submit it to JIRA.
Is there anything you suggest I try, in order to isolate the issue? I've only noticed this behavior because the following stopped working:<security:identity authenticate-method="#{authenticator.authenticate}" />
-
4. Re: Ear with multiple web modules - problem with components.
reind Jan 22, 2008 12:49 PM (in response to reind)Ok, it's starting to make more sense (though the behavior has changed since since moving to seam 2 from 1.2)
I have several components.xml files, each of which configure the Identity authenticate-method to use a different auth component & method:
a.war:<security:identity authenticate-method="#{authA.authenticate}" />
b.war:<security:identity authenticate-method="#{authB.authenticate}" />
When I login to "b" it will call the authentication-method declared for a.war (instead of the one configured in b.war/WEB-INF/components.xml). -
5. Re: Ear with multiple web modules - problem with components.
reind Jan 22, 2008 1:27 PM (in response to reind)It looks like seam needs to be loaded multiple times - once for each web module - to configure the built in components differently. I had mostly the same structure using seam 1.2 and this worked, so I'm not sure what's changed.
If I only have one module then it correctly invokes the authenticate-method configured in the components.xml file. -
6. Re: Ear with multiple web modules - problem with components.
reind Jan 22, 2008 3:07 PM (in response to reind)I've filed a JIRA issue:
http://jira.jboss.org/jira/browse/JBSEAM-2523
From what I've found it looks like the Identity component is not scopped to the appropriate WAR. If you have an EAR with multiple WARs it's not clear which Identy component (which components.xml configuration) will apply. -
7. Re: Ear with multiple web modules - problem with components.
reind Jan 29, 2008 5:58 PM (in response to reind)Took a while but I found a solution (or, rather, the cause) of this issue.
I removed he MyFacesExtensionsFilter from every web.xml file and now Authentication works as expected:
remove from web.xml<filter> <filter-name>MyFacesExtensionsFilter</filter-name> <filter-class> org.apache.myfaces.webapp.filter.ExtensionsFilter </filter-class> <init-param> <description> Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description> <param-name>maxFileSize</param-name> <param-value>20m</param-value> </init-param> </filter> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <servlet-name>Faces Servlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> </filter-mapping>
I've closed the JIRA bug.