NamingEnumeration userEnum = null;
List resultList = new Vector(1024);
try
{
LDAPURL url = JetspeedLDAP.buildURL( baseDN );
DirContext ctx = JetspeedLDAP.getService().connect(url);
userEnum = JetspeedLDAP.search(ctx, url.getDN(), filter, attributesToFetch, JetspeedLDAP.getService().SUB);
while (userEnum.hasMoreElements())
{
LDAPUser user = buildUser(((SearchResult)userEnum.nextElement()).getAttributes());
resultList.add( user );