// Disable the ChangeLog system
service.getChangeLog().setEnabled(false);
service.setDenormalizeOpAttrsEnabled(true);
Partition ipponPartition = addPartition("ippon", "dc=ippon,dc=fr");
// And start the service
service.startup();
// Inject the ippon root entry if it does not already exist
try {
service.getAdminSession().lookup(ipponPartition.getSuffixDn());
System.out.printf("Root %s found ! %n", ipponPartition.getSuffixDn());
} catch (LdapNameNotFoundException lnnfe) {
System.out.printf("Root %s not found ! creating it ... %n", ipponPartition.getSuffixDn());
LdapDN dnippon = new LdapDN("dc=ippon,dc=fr");
ServerEntry entryippon = service.newEntry(dnippon);
entryippon.add("objectClass", "top", "domain", "extensibleObject");
entryippon.add("dc", "ippon");
service.getAdminSession().add(entryippon);
System.out.printf("Importing some data ... %n", ipponPartition.getSuffixDn());
InputStream is = this.getClass().getResource("ipponTestLdapExport.ldif").openStream();
LdifReader ldifReader = new LdifReader(is);
for (LdifEntry entry : ldifReader) {
injectEntry(entry, service);
}