3 Replies Latest reply on Jan 29, 2008 6:05 PM by Reind D

    Component scope w/ multiple Wars - Effect on SeamLoginModule

    Michael Robinson Newbie

      First of all the Seam security stuff is awesome!

      I have a question though regarding the scope of components. From searching through some other post on the forum I think that Seam components are created and scoped at the War level. Is this correct? e.g. If I have an Ear with multiple War files, then each War would need to "deploy" the components that it requires.

      Assuming this is true my problem seems to be with the SeamLoginModule and how it works in this scenrio of multiple War files packaged into one Ear. For example lets say we have two War files, A and B respectively. War project A configures Seam authentication using:

      <security:identity authenticate-method="#{authenticator.authenticate}" />

      War project B does not configure any security mechanisms. When the application is deployed attempting to login to project A fails silently and the authenticate method is never invoked. A FacesMessage of "Login Failed" is displayed. Declaring the authenticate-method in project B causes the authentication to work properly. Also if War project B is removed from the deployment entirely then authentication also works properly.

      Is it possible to scope the authentication this way?