Carlos Sánchez wrote:
> Hi,
> 
>    I think I have found a solution for this issue, just in case anyone 
> needs it. First thing I did was to change from version 4.17 to 4.18 but 
> the issue was still there.
> 
>    The problem is when you call the destroy() method in the 
> ConnectionPool class. This method only close the connections in the pool 
> but no the original connection used to create it (all the connections in 
> the pool are clones).
> 
>    Closing that original connection seems to solve the problem. HEre is 
> the modified method:
> 
>      /**
>      * Destroy the whole pool - called during a shutdown
>      */
>     public void destroy() {
>         for ( int i = 0; i < pool.size(); i++ ) {
>             disconnect(
>                 (LDAPConnectionObject)pool.elementAt(i) );
>         }
>         pool.removeAllElements();
>         //Disconnect the connection used as a template
>         if (ldc.isConnected())
>             try {
>                 ldc.disconnect();
>             } catch (LDAPException e) {}
>     }
> 
> Cheers,
> 
> Carlos.

Thanks!  Do you know if there is a bug about this issue?  If not, could 
you please open one and attach this patch?  Thanks!

> 
> Carlos Sánchez escribió:
>> Hi,
>>
>>    In my app I need to create an LDAPv3 connections pool. As default 
>> protocol version is 2 I have to create the pool creating a connection 
>> setting the version to 3 and use that connection to create the pool. 
>> This works fine.
>>
>>    The problem is when the application want to destroy the pool. I can 
>> actually destroy the pool and all its connections get closed but I 
>> can't disconnect the first connection created to set the protocol 
>> version...I call disconnect() method and don't get any exception but 
>> the connection remains open.
>>
>>    I have tried to close the connection just after create the pool 
>> with the same results. Any idea?
>>
>> Thanks in advance,
>>
>> Carlos.
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap

Reply via email to