directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lucas theisen (JIRA)" <>
Subject [jira] [Commented] (DIRAPI-200) unBind() followed by bind() on the same connection may throw an IllegalStateException
Date Fri, 07 Nov 2014 23:15:34 GMT


lucas theisen commented on DIRAPI-200:

Attempting the rebind again resulted in a different error this time, MUCH earlier:

Iteration # 0
Failure after 13 iterations The response queue has been emptied,
no response was found.
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(
        at org.junit.internal.runners.statements.RunBefores.evaluate(
        at org.junit.internal.runners.statements.RunAfters.evaluate(
        at org.junit.runners.ParentRunner.runLeaf(
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(
        at org.junit.runners.ParentRunner$
        at org.junit.runners.ParentRunner$1.schedule(
        at org.junit.runners.ParentRunner.runChildren(
        at org.junit.runners.ParentRunner.access$000(
        at org.junit.runners.ParentRunner$2.evaluate(
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
        at org.apache.maven.surefire.booter.ForkedBooter.main(
Caused by: TimeOut occurred
        ... 30 more
Time to create and use 10 000 connections = 10321

> unBind() followed by bind() on the same connection may throw an IllegalStateException
> -------------------------------------------------------------------------------------
>                 Key: DIRAPI-200
>                 URL:
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M23
>            Reporter: lucas theisen
> Not sure if this even should be allowed but the fact that it can result in an exception
is disconcerting.  I added a test case to {{LdapConnectionPoolTest}} (with the {{unBind()}}
currently commented out) that can be used to reproduce this issue.
> The main question here, in my mind, is whether or not this should be allowed.  If not
allowed, we should immediately throw a more reasonable exception if any operation is attempted
on an {{LdapConnection}} that has had {{unBind()}} called on it.  Perhaps still an {{IllegalStateException}},
but maybe with a message stating _connection no longer valid after unBind()_.  More importantly,
this should happen every time, rather than just when the race condition bears its ugly face.
 For more discussion, see [this email chain|].

This message was sent by Atlassian JIRA

View raw message