« Darker days | Main | Rain »
October 12, 2004
Games
Again, I've gone back to playing around with schema entries, and refactoring a bit to see what I can keep from my play. So I only need a little code to list the schema definition objects:
public static void main(String [] args) {
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, LDAP_SERVER);
try {
DirContext ctx = new InitialDirContext(env);
DirContext schema = ctx.getSchema("");
Attributes attrs = ctx.getAttributes(getSubSchemaSubEntryDN(ctx));
HashSet schemaObjects = getSchemaObjects(schema, attrs);
System.out.println(schemaObjects);
ctx.close();
} catch (NamingException e) {
e.printStackTrace();
}
}
Now, if only I could remember what I was trying to do before I started playing around...
Posted by Mark at October 12, 2004 02:04 PM