I just noticed this email. Did you get a response to this email? Alex
On Fri, Dec 19, 2008 at 10:03 AM, Lorenz Breu <[email protected]> wrote: > hi guys > > while testing my application that uses ADS as a backend (embedded) i > noticed the following weird behaviour and would like to ask if it is my bad, > or the apache's... > > added the following attribute type: > > entry = directory.newEntry(new > LdapDN("m-oid="+SCHEMA_UIDS.get("slpIntegerAttribute")+", ou=attributeTypes, > cn=slpService, ou=schema")); > entry.add("objectClass", "top","metaAttributeType", "metaTop"); > entry.add("m-oid", SCHEMA_UIDS.get("slpIntegerAttribute")); > entry.add("m-name","slpIntegerAttribute"); > entry.add("m-description", "The precursor for all new integer attribute > types"); > entry.add("m-equality","integerMatch"); > entry.add("m-syntax", "1.3.6.1.4.1.1466.115.121.1.27"); > directory.getAdminSession().add(entry); > > > then added a new attribute "slpInteger-number" with "SUP > slpIntegerAttribute" (is correctly added to the registry): > > then added a new entry that looks like this: > > [STORE]: storing service service:osgi://hugentobler:124 as entry > ServerEntry > dn[]: slpserviceurl=service:osgi://hugentobler:124,dc=slpservices > objectClass: slpService > objectClass: extensibleObject > slpInteger-number: 42 > slpInteger-number: 1337 > slpScopeList: default > slpAttributeList: (number=42, 1337) > slpScope: default > slpServiceUrl: service:osgi://hugentobler:124 > > AND NOW I SEARCH WITH THE FOLLOWING FILTER: > String filter = > (&(slpScope=default)(&(slpServiceUrl=service:osgi*)(|(slpInteger-number>=3000)(slpInteger-number<=40)))) > > with the following code: > List<Service> results = new ArrayList<Service>(); > CoreSession session = directory.getAdminSession(); > ServerLdapContext ctx = new ServerLdapContext(directory,session,new > LdapDN("dc=slpservices")); > NamingEnumeration<SearchResult> list = ctx.search("", filter,new > SearchControls()); > > > > => THIS RETURNS THE AFOREMENTIONED ENTRY!!! > but it shouldn't, as the last disjunction is false, as both numbers are > between 40 and 3000... > > can anybody see where i went wrong?? or is there an error in the filter > parsing within ADS? > > > cheers, > lorenz > >
