Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D67C17BB8 for ; Fri, 7 Nov 2014 23:36:34 +0000 (UTC) Received: (qmail 52032 invoked by uid 500); 7 Nov 2014 23:36:34 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 51921 invoked by uid 500); 7 Nov 2014 23:36:34 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 51660 invoked by uid 99); 7 Nov 2014 23:36:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 23:36:34 +0000 Date: Fri, 7 Nov 2014 23:36:34 +0000 (UTC) From: "lucas theisen (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DIRAPI-200) unBind() followed by bind() on the same connection may throw an IllegalStateException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRAPI-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14202940#comment-14202940 ] lucas theisen commented on DIRAPI-200: -------------------------------------- Per our conversation, I moved {{testRebindNoPool}} to {{LdapConnectionTest.java}}. I left both {{testRebind}} and {{testRebindNoPool}} as ignored even though it is successful up to 30K iterations on linux. I also left the iteration count at 10K in case we want to remove the ignore. > unBind() followed by bind() on the same connection may throw an IllegalStateException > ------------------------------------------------------------------------------------- > > Key: DIRAPI-200 > URL: https://issues.apache.org/jira/browse/DIRAPI-200 > 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|http://mail-archives.apache.org/mod_mbox/directory-dev/201407.mbox/%3CEE6ADC61AF2D71408E4FA7F9517DB7710A9C07E5%40IMCMBX03.MITRE.ORG%3E]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)