2 Replies Latest reply: Aug 2, 2012 10:53 PM by 953005 RSS

    hasMore takes a long time (around 3 minutes)

      hi.. i'm attempting to run a jndi ldap query of

      final Enumeration<SearchResult> search = ctx.search("DC=corp,DC=phoenix,DC=co,DC=il", "(&(objectClass=user)({0}={1}))", new Object[] {"sAMAccountName","usf02000"}, ctrls);

      the problem is in the loop itiration.

      while (search.hasMoreElements()) {
      LOGGER.trace("getting next element");
      final SearchResult result = search.nextElement();
      final String nameInNamespace = result.getNameInNamespace();
      LOGGER.trace("getting attributes");
      final Attributes attributes = result.getAttributes();
      LOGGER.trace("populating" + nameInNamespace);

      it seems to hang (on random occasions) o the hasMoreElements method, i cannot reproduce it entirely however this only happens in websphere