Ejemplo n.º 1
0
  public ApacheDSContainer(String root, String ldifs) throws Exception {
    this.ldifResources = ldifs;
    service = new DefaultDirectoryService();
    List<Interceptor> list = new ArrayList<Interceptor>();

    list.add(new NormalizationInterceptor());
    list.add(new AuthenticationInterceptor());
    list.add(new ReferralInterceptor());
    //        list.add( new AciAuthorizationInterceptor() );
    //        list.add( new DefaultAuthorizationInterceptor() );
    list.add(new ExceptionInterceptor());
    //       list.add( new ChangeLogInterceptor() );
    list.add(new OperationalAttributeInterceptor());
    //        list.add( new SchemaInterceptor() );
    list.add(new SubentryInterceptor());
    //        list.add( new CollectiveAttributeInterceptor() );
    //        list.add( new EventInterceptor() );
    //        list.add( new TriggerInterceptor() );
    //        list.add( new JournalInterceptor() );

    service.setInterceptors(list);
    partition = new JdbmPartition();
    partition.setId("rootPartition");
    partition.setSuffix(root);
    this.root = root;
    service.addPartition(partition);
    service.setExitVmOnShutdown(false);
    service.setShutdownHookEnabled(false);
    service.getChangeLog().setEnabled(false);
    service.setDenormalizeOpAttrsEnabled(true);
  }