Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-985

LDAPLoginModule generates a large number of DirContext objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.4
    • 2.2.5, 3.0.0
    • karaf
    • None
    • Karaf 2.2.5-snapshot

    Description

      In class org.apache.karaf.jaas.modules.ldap.LDAPLoginModule, "DirContext.close()" and "NamingEnumeration.close()" are not called in all cases.
      Although it is not mandatory, it would be better to call it in all cases (to be sure, in a "finally" block).
      http://download.oracle.com/javase/tutorial/jndi/ldap/close.html
      Otherwise, this leaves one "com.sun.jndi.ldap.Connection" thread running for each LDAP request. After several minutes, the thread disappears automatically.
      During a performance test with 10 concurrent users, this creates up to several hundreds of such threads.

      Attachments

        1. LDAPLoginModule.patch
          5 kB
          Glen Mazza

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            metatech metatech
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified