2 Replies Latest reply on Mar 3, 2004 5:12 AM by SVen

    custom loginmodule concurrent logins

    SVen Newbie

      Hi all

      I have the following problem/question and haven't been able to find an answer neither in the documententation (JBoss Administration and
      Development, Hands-on-Guide,...) nor the forums, nor google.

      I have successfully implemented my own custom LoginModule which subclasses org.jboss.security.auth.spi.AbstractServerLoginModule. The LoginModule uses some backendsystems (like SAP, a database, ...) to validate the user and to assign roles. Everything works fine so far.

      The only problem i am facing is that my LoginModul is unable to handle concurrent logins. So if I try to connect my secured EJB with, say, 10 users, all logins are performed one after another which is not very satisfying, because sometimes a validation takes up to 10 seconds and so it takes a very long time until the last client was authenticated.

      I guess it should be possible to run multiple instance of my LoginModule at the same time (because theire are running instance concurrently) but how can I configure JBoss/my loginModule?

      here is a sample (serverside-output) where you can see the method calls
      (remember both calls are send (almost) at the same time):

      //first call is proceeded
      [MyLoginModule 1] initialize()
      [MyLoginModule 1] login()
      [MyLoginModule 1] validation()
      [MyLoginModule 1] commit()
      [MyLoginModule 1] getIdentity()
      [MyLoginModule 1] getRoleSets()
      [MyLoginModule 1] createGroup()
      [MyLoginModule 1] createGroup()
      //second call is proceeded
      [MyLoginModule 2] initialize()
      [MyLoginModule 2] login()
      [MyLoginModule 2] validation()
      [MyLoginModule 2] commit()
      [MyLoginModule 2] getIdentity()
      [MyLoginModule 2] getRoleSets()
      [MyLoginModule 2] createGroup()
      [MyLoginModule 2] createGroup()
      [MyLoginModule 1] logout()
      [MyLoginModule 1] getIdentity()
      [MyLoginModule 2] logout()
      [MyLoginModule 2] getIdentity()

      I am using JBoss 3.2.3 on Windons 2000 Professionel and J2SDK 1.4.2

      If you need further information just ask.

      Thank you in advance