entryOcls.add( SchemaConstants.TOP_OC );
entryOcls.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
entry.put( entryOcls );
entry.put( SchemaConstants.OU_AT, "favorite" );
String entryRdn = "ou=favorite";
ctx.createSubcontext( entryRdn, entry );
// Create Alias ou=bestFruit,dc=directory,dc=apache,dc=org to ou=favorite
String aliasedObjectName = entryRdn + "," + ctx.getNameInNamespace();
Attributes alias = new BasicAttributes( true );
Attribute aliasOcls = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT );