pdf / 9-jndi_nameservices
.pdfDirectory Operations
(DirContext )
Reading an object's attributes
Modifying an object's attributes
Searching the directory
Basic Search
Search Filters
Search Controls
Performing hybrid naming and directory operations
Class SearchControls
Какие атрибуты возвращать ctls.setReturningAttributes(attrIDs);
В каких пределах вести поиск ctls.setSearchScope(SearchControls.SUBTREE_SCOPE)
Максимальное число результатов ctls.setCountLimit(1);
Время ожидания ctls.setTimeLimit(1000);
Возращать ли объект связанный с entity ctls.setReturningObjFlag(true);
Что делать с линками?
Event Notification
Нужна поддержка от провайдера
NamingListener
ObjectChangeListener
NamespaceChangeListener
UnsolicitedNotificationListener (асинхронные сообщения от LDAP сервера)
Storing Objects in the Directory
●Java serializable objects
●Referenceable objects and JNDI References
●Objects with attributes (DirContext)
●RMI (Java Remote Method Invocation) objects (including those that use IIOP)
●CORBA objects
DNS Provider
Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory"); env.put("java.naming.provider.url",
"dns://server1.sun.com/sun.com");
DirContext ictx = new InitialDirContext(env); Attributes attrs1 = ictx.getAttributes("host1", types); Attributes attrs2 = ictx.getAttributes("host2", types);