public void close() throws NamingException { more = false; if (_bindingIter != null) { _bindingIter.destroy(); _bindingIter = null; } if (_ctx != null) { _ctx.decEnumCount(); /** * context was obtained by CNCtx, the user doesn't have a handle to it, close it as we are * done enumerating through the context */ if (isLookedUpCtx) { _ctx.close(); } _ctx = null; } }