1 Reply Latest reply on Apr 22, 2003 12:35 PM by frobazz

    JAAS performance

    lordlust

      The application i'm writing uses several loginmodules for authorization. I have one module that retrieves roles from an LDAP server and one that retrieves roles from a database.
      Since JBoss performs the login at each EJB method call, this is becoming a serious bottleneck
      Is there a way to avoid retrieving all those roles at every method call?

        • 1. Re: JAAS performance
          frobazz

          By default, it shouldn't be retrieving the roles at every method call, it is supposed to be caching them. I have a custom login module that assigns roles based on a different database schema, and I've noticed that when I update my schema and authenticate with the same user, I get the previous role-set.

          Plus, I've seen them refer to caching the authentication information to avoid precisely the problem you're having. Check your JMX console, look for the following:

          jboss.security heading
          service=JaasSecurityManager

          Under that, check to make sure that:
          AuthenticationCacheJndiName is set to
          java:/timedCacheFactory

          Good luck!