Uploaded image for project: 'FUSE Message Broker'
  1. FUSE Message Broker
  2. MB-841

Login.config, user and group properties are re-open with each connection.

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.4.2-fuse-02-00
    • Fix Version/s: 5.5.0-fuse-00-00
    • Component/s: broker
    • Labels:
      None

      Description

      Hi,

      We've noticed that with each connection, the files noted above seem to be re-open each time. In a scenario where many client send one message , this can cause an adverse impact on performance. Is there any way to open this file once or if need be implement a periodic check for changes?

      We can see this behavior simply with the debug logging on;

      2011-03-18 14:29:37,828 | DEBUG | Initialized debug=true usersFile=users2.properties groupsFile=groups2.properties basedir=/Users/sjavurek/Fuse/activemq/apache-activemq-5.4.2-fuse-02-00/dev2943/conf | org.apache.activemq.jaas.PropertiesLoginModule | ActiveMQ Transport: tcp:///127.0.0.1:61331

      If I've read the code correctly this comes from PropertiesLoginModule:

              if (System.getProperty("java.security.auth.login.config") != null) {
              	System.out.println("****** GET login file");
                  baseDir = new File(System.getProperty("java.security.auth.login.config")).getParentFile();
              } else {
                  baseDir = new File(".");
              }
       
              debug = "true".equalsIgnoreCase((String)options.get("debug"));
              usersFile = (String)options.get(USER_FILE) + "";
              groupsFile = (String)options.get(GROUP_FILE) + "";
       
              if (debug) {
                  LOG.debug("Initialized debug=" + debug + " usersFile=" + usersFile + " groupsFile=" + groupsFile + " basedir=" + baseDir);
              }

      I also added a few additional debug statements where these files are read. When I run our PropertiesLoginModuleTest junt test, I can see the code executed 3 times (once for each test):

       Here in static
      ****** GET login file
      *******  OPEN USERS
      *******  OPEN GROUPS
      ****** GET login file
      *******  OPEN USERS
      *******  OPEN GROUPS
      ****** GET login file
      *******  OPEN USERS
      *******  OPEN GROUPS

      Kindest regards,
      Susan

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dbosanac Dejan Bosanac
                Reporter:
                sjavurek Susan Javurek
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: