0 Replies Latest reply on Dec 1, 2008 4:36 PM by Alexandre Dubreuil

    Seam 2.1 LDAP Identity Management transaction failed exception

    Alexandre Dubreuil Newbie

      Hi all,

      I'm working on a project right now where we make an hybrid authentication; there is first a query in a MySQL database (using Seam entityManager.createQuery), then if the the user is found in our DB, we do identityManager.authenticate(username, credential) to check if the user has correct credential.

      We have a custom implementation of the IdentityStore used by the IdentityManager for authentication, which connects to a corporate LDAP.

      The problem is when authentication fails on the LDAP side. We have two exceptions showing on the screen that we want to get rid of. First, there is a Transaction Failed exception (from SeamPhaseListener:447, org.jboss.seam.TransactionFailed) and Not Logged In (from Pages:657, org.jboss.seam.notLoggedIn). Please note that these are actually facesMessages added by Seam by default.

      The problem is we have no idea why those two events are raised, and want to know why. We got rid of the TransactionFailed exception (by setting a blank key in messages), but we can't do the same for the NotLoggedIn exception, since we want to keep it in certain case.

      We though it might be related to the transaction being started with the query (in our DB) and ended by an exception (the authentication of the identity store throws an exception if it fail), which is actually a Seam Event. Then the transaction would be in a failed state, thus the facesmessage Transaction Failed. For the Not Logged In exception, it might be a side effect, since the event is raised after the Transaction Failed.

      Any ideas would help.