3 Replies Latest reply on Dec 2, 2013 6:38 AM by Marek Novotny

    Seam 2.3.1 discrepancy between runtime execution and Seam-Arquillian test execution

    Duran Harris Newbie

      Hi,

       

      I am having a problem where I am experiencing different behaviour when testing and running the same ear file. When I use Arquillian Seam extension to invoke the application logic, everything is fine. When I try to deploy the same EAR file to Jboss 7.1, I have a problem whereby some values are not being outjected to the SessionContext successfully. I am using Seam 2.3.1 and Jboss 7.1.

       

      I have a scenario like this :

       

      -User navigates to login.xhtml

      -Populates userName and Password

      -Clicks the submit button which invokes #{identity.login}

      -#{identity.login} invokes my custom AuthenticatorBean

      -AuthenticatorBean->authenticate method is executed.

      -during execution of the authenticate-method I manually use Contexts.getSessionContext.set("user",userEntity) to put the user into the session and additionally log out the result of calling "Contexts.getSessionContext.get("user",userEntity)" to ensure the user is actually in the session.(It is)

       

      The problem is that after the authenticate-method is called and the next view is rendered, there is no user in the SessionContext...even though I manually inserted it into the sesionContext in the authenticate-method. To make matters even more confusing, if I take the exact same EAR file and test it with the Seam Arquillian extension the user then is populated in the sessionContext correctly.

       

      Any tips would be greatly appreciated...