openldap 接続で ObjectChangeListener を使用しようとしています。次のJavaコードを取得しました
public class MyListener implements ObjectChangeListener
{
// Here my class variable
public MyListener (DirContext ldapContext, String myDn) throws InternalException
{
try
{
// Make a new connection without pooling
Hashtable env = new Hashtable(ldapContext.getEnvironment());
// env is set by other classes : in our case we use the factory java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
InitialDirContext localContext = new InitialDirContext(env);
// Get the EventContext for registering the listener
evtCtx = (EventContext) localContext.lookup("");
localContext.close();
// Register the listener for namespace change events
evtCtx.addNamingListener(myDn, EventContext.OBJECT_SCOPE, this);
}
catch (NamingException e)
{
throw new InternalException("Error while registering my listener");
}
}
//some methods
}
新しい MyListenerObject を作成すると、openLdap サーバーから次のエラーが送信されました。
javax.naming.OperationNotSupportedException: [LDAP: エラーコード 12 - 重要な拡張子が認識されません]; 残りの名前「ou=MyOU,O=MyOrg」
OpenLdap を使用して ObjectListener を作成するために何をする必要があるか (または可能であれば) わかりません。
どうも