1 Reply Latest reply on Jun 19, 2003 11:15 AM by Peter Doornbosch

    How to start transaction in custom login module?

    nish_dce Newbie

      Hi All,
      I again have a problem for which I have no clues!;o(
      Actually, I need to perform some direct Database updation before each EJB method call,so I want to put it in the "CustomLoginModule" itself,as it would be executed per EJB method call.
      The issue is that I want to rollback any changes I do during LoginModule;if my actual EJB method call fails.

      That is,the database updation as well as method call invocation should be a part of "one" transaction only!
      Is it possible?

      Any help would be highly appreciated!

      Thanks in advance,
      Newbie

        • 1. Re: How to start transaction in custom login module?
          Peter Doornbosch Apprentice

          > Actually, I need to perform some direct Database
          > updation before each EJB method call,so I want to put
          > it in the "CustomLoginModule" itself,as it would be
          > executed per EJB method call.

          This won't work, as the login module is not called for each ejb request (the security manager caches this info).

          > The issue is that I want to rollback any changes I do
          > during LoginModule;if my actual EJB method call
          > fails.

          So put this direct database update in a sessionbean and put them together in one (ejb) transaction. I pretty sure it is impossible to combine ejb transactions with transactions started in a login module, because these are two completely separated tasks.

          Hth
          Peter.