You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "metatech (Created) (JIRA)" <ji...@apache.org> on 2011/11/07 15:16:51 UTC

[jira] [Created] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

LDAPLoginModule generates a large number of DirContext objects
--------------------------------------------------------------

                 Key: KARAF-985
                 URL: https://issues.apache.org/jira/browse/KARAF-985
             Project: Karaf
          Issue Type: Bug
          Components: karaf-config
    Affects Versions: 2.2.4
         Environment: Karaf 2.2.5-snapshot
            Reporter: metatech
            Priority: Minor


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.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Resolved JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved KARAF-985.
----------------------------------------

    Resolution: Fixed
    
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 2.2.5, 3.0.0
>
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-985:
---------------------------------------

    Fix Version/s: 3.0.0
                   2.2.5
    
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 2.2.5, 3.0.0
>
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Glen Mazza (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Glen Mazza updated KARAF-985:
-----------------------------

    Attachment: LDAPLoginModule.patch

Possible solution for 3.0 branch (untested but builds fine and JUnit tests still work).
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Resolved JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved KARAF-985.
----------------------------------------

    Resolution: Fixed
    
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146449#comment-13146449 ] 

Jean-Baptiste Onofré commented on KARAF-985:
--------------------------------------------

Fixed on trunk: revision 1199373.
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "metatech (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152765#comment-13152765 ] 

metatech commented on KARAF-985:
--------------------------------

There is still one bug with the fix : 
In step 1, the "hasMore" is not called after the "next" is called, so the naming enumeration is not automatically closed.
Here is the complete fix : 
[192]            SearchResult result = (SearchResult) namingEnumeration.next();
[193]            userDN = (String) result.getName();
+                namingEnumeration.close();

With the complete fix, maximum 10 LDAP connections are simultaneously in "ESTABLISHED" state (in netstat) with 10 concurrent users, instead of hundreds.

Beware that there are still cases (although I cannot give an practical example) where a NamingException might be thrown by "next" or "hasMore", in which case the naming enumeration would not be read up to the end.


                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157209#comment-13157209 ] 

Jean-Baptiste Onofré commented on KARAF-985:
--------------------------------------------

Fixed on trunk: revision 1206232.
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 2.2.5, 3.0.0
>
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Glen Mazza (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146082#comment-13146082 ] 

Glen Mazza commented on KARAF-985:
----------------------------------

The JavaDoc for NamingEnumeration.close()[1] says "If an enumeration proceeds to the end--that is, until hasMoreElements() or hasMore() returns false-- resources will be freed up automatically and there is no need to explicitly call close()."  For two out of the three cases with NamingEnumeration in this file, either of the two methods above will indeed return false, so close() shouldn't be needed then.  I did add in a close() in the proposed patch for the third case.

For DirContext(), I added in close() in the two of three scenarios where it wasn't already being called.

[1] http://download.oracle.com/javase/6/docs/api/javax/naming/NamingEnumeration.html#close%28%29
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "metatech (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

metatech reopened KARAF-985:
----------------------------


One missing close (patch in comment)
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146480#comment-13146480 ] 

Jean-Baptiste Onofré commented on KARAF-985:
--------------------------------------------

Fixed on karaf-2.2.x: revision 1199391.
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Closed] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jamie goodyear (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jamie goodyear closed KARAF-985.
--------------------------------

    
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 2.2.5, 3.0.0
>
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157220#comment-13157220 ] 

Jean-Baptiste Onofré commented on KARAF-985:
--------------------------------------------

Fixed on karaf-2.2.x: revision 1206247.
                
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 2.2.5, 3.0.0
>
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Work started] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Work started JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on KARAF-985 started by Jean-Baptiste Onofré.

> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Assigned] (KARAF-985) LDAPLoginModule generates a large number of DirContext objects

Posted by "Jean-Baptiste Onofré (Assigned JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré reassigned KARAF-985:
------------------------------------------

    Assignee: Jean-Baptiste Onofré
    
> LDAPLoginModule generates a large number of DirContext objects
> --------------------------------------------------------------
>
>                 Key: KARAF-985
>                 URL: https://issues.apache.org/jira/browse/KARAF-985
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 2.2.4
>         Environment: Karaf 2.2.5-snapshot
>            Reporter: metatech
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>         Attachments: LDAPLoginModule.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira