tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milos Volauf (JIRA)" <>
Subject [jira] [Commented] (OPENEJB-2119) Incorrect binary tree - IvmContext
Date Mon, 19 Oct 2015 07:48:05 GMT


Milos Volauf commented on OPENEJB-2119:


right now, I do not understand the code in NameNode and IvmContext so well to fix it.
I see that NameNode implement binary tree (for quick lookup, but would not be HashMap sufficient
and simpler?),
but I do not understand the "subTree" node.
Moreover, I find confusing that ParsedName is not immutable, its ParsedName.getComponentHashCode()
(after calls to or ParsedName.reset() etc.) This I find quite confusing...
for example,
NameNode.createSubcontext(ParsedName) takes the parsed name, and calls reset on it...

> Incorrect binary tree - IvmContext
> ----------------------------------
>                 Key: OPENEJB-2119
>                 URL:
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: Milos Volauf
>            Priority: Critical
>         Attachments:
> 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.
> I used openejb-core-4.7.1

This message was sent by Atlassian JIRA

View raw message