I should say about filtering in directories briefly,
they use Polish(prefix) algorithm to filter their
data. for example if you want to find a person with
this DN: cn=button, o=x.org
(it is a serialazable object)or ou=developers, o=x.org
you have to write:
...
Name compoundName = parser.parse("");
String filter = "(|(ou=dev*)(cn=button))";