Jboss successfull event is not firing

56 Views Asked by At

We have Seam application, we have following code

if( isLoginSuccess(userId,Passwor) ){
    Identity.instance().login();
}

and in component.xml we have configuration

<event type="org.jboss.seam.security.loginSuccessful">
        <action execute="#{defaultPageRedirector.returnToCapturedView()}"/>
    </event>

Every time isLoginSuccess(userId,Passwor) return true ( we know that ) but only sometime ( randomly ) returnToCapturedView() is called , its happening randomly.

Could you please help me in this regards

2

There are 2 best solutions below

0
Omid P On

If it is happening randomly there is something wrong with your defaultPageRedirector check seam redirect.

According to Seam Identity, This event raises only if user is not loggedIn Or user is loogedIn but siletnLogin attribute is set.

0
DaveB On

where are you getting defaultPageRedirector from? Is this your own version of seams Redirect component?

Is should be:

<event type="org.jboss.seam.security.loginSuccessful">
    <action execute="#{redirect.returnToCapturedView}"/>
</event>