Return-Path: X-Original-To: apmail-tomee-commits-archive@www.apache.org Delivered-To: apmail-tomee-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A020D17985 for ; Fri, 16 Oct 2015 14:59:05 +0000 (UTC) Received: (qmail 59773 invoked by uid 500); 16 Oct 2015 14:59:05 -0000 Delivered-To: apmail-tomee-commits-archive@tomee.apache.org Received: (qmail 59593 invoked by uid 500); 16 Oct 2015 14:59:05 -0000 Mailing-List: contact commits-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tomee.apache.org Delivered-To: mailing list commits@tomee.apache.org Received: (qmail 59460 invoked by uid 500); 16 Oct 2015 14:59:05 -0000 Delivered-To: apmail-openejb-commits@openejb.apache.org Received: (qmail 59454 invoked by uid 99); 16 Oct 2015 14:59:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Oct 2015 14:59:05 +0000 Date: Fri, 16 Oct 2015 14:59:05 +0000 (UTC) From: "Milos Volauf (JIRA)" To: commits@openejb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (OPENEJB-2119) Incorrect binary tree - IvmContext 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/OPENEJB-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Milos Volauf updated OPENEJB-2119: ---------------------------------- Attachment: Testing.java Test case. > Incorrect binary tree - IvmContext > ---------------------------------- > > Key: OPENEJB-2119 > URL: https://issues.apache.org/jira/browse/OPENEJB-2119 > Project: OpenEJB > Issue Type: Bug > Reporter: Milos Volauf > Priority: Critical > Attachments: Testing.java > > > I get many javax.naming.NameAlreadyBoundException exceptions so I digged into org.apache.openejb.core.ivm.naming.IvmContext and org.apache.openejb.core.ivm.naming.NameNode. > I was strange that NameAlreadyBoundException was fired from IvmContext.rebind, which does unbind and then bind. > The debugging showed me that binary tree (implemented by NameNode) gets sometimes into incorrect state and consequently unbind does not find the node. > The problem is that IvmContext has a reference to NameNode and calls bind() but the binary tree is correct only if bind() starts at the tree root. There is one big tree and several contexts have their nodes in it (IvmContext.mynode) and bind new nodes starting in mynode. > I prepared a small test case which shows how the tree can enter into incorrect state. -- This message was sent by Atlassian JIRA (v6.3.4#6332)