相关疑难解决方法(0)

运行嵌入在我的应用程序中的Apache DS

我正在尝试在我的应用程序中运行嵌入式ApacheDS.在阅读http://directory.apache.org/apacheds/1.5/41-embedding-apacheds-into-an-application.html后,我构建了这个:

public void startDirectoryService() throws Exception {
    service = new DefaultDirectoryService();
    service.getChangeLog().setEnabled( false );

    Partition apachePartition = addPartition("apache", "dc=apache,dc=org");
    addIndex(apachePartition, "objectClass", "ou", "uid");

    service.startup();

    // Inject the apache root entry if it does not already exist
    try
    {
        service.getAdminSession().lookup( apachePartition.getSuffixDn() );
    }
    catch ( LdapNameNotFoundException lnnfe )
    {
        LdapDN dnApache = new LdapDN( "dc=Apache,dc=Org" );
        ServerEntry entryApache = service.newEntry( dnApache );
        entryApache.add( "objectClass", "top", "domain", "extensibleObject" );
        entryApache.add( "dc", "Apache" );
        service.getAdminSession().add( entryApache );
    }
}
Run Code Online (Sandbox Code Playgroud)

但运行后我无法连接到服务器.什么是默认端口?或者我错过了什么?

这是解决方案: …

java apache ldap apacheds

12
推荐指数
3
解决办法
1万
查看次数

标签 统计

apache ×1

apacheds ×1

java ×1

ldap ×1