0 Replies Latest reply on May 23, 2008 12:15 PM by dam

    Login restriction causes entityHome to be in unexpected state

    dam

      I have webpages restricted to only be shown, when a user is logged in. In pages.xml i listen for the NotLoggedInException and redirect to the login page, if thrown.


      A user is managed by an EntityHome, which has session scope.
      This object is created in the authenticator by


      @In(create = true)
      private UserHome userHome;



      and populated by the user found in the authenticate method by setting


      userHome.setInstance(theUser)



      And now to the problem:


      If and only if I go to any page restricted without being logged in, triggering a trip to the login page, after login the user object is not managed by the userHome. Instead the managed property of the userHome is


      java.lang.IllegalStateException[EntityManager is closed]



      Any clues why?


      /Dam