这里面包含了一百多个JAVA源文件

源代码在线查看: e485. adding a binding with attributes to the directory.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				This example adds a name-to-object binding along with attributes to the directory. 
				    try {
				        // Create attributes to be associated with the new entry
				        Attributes attrs = new BasicAttributes(true); // case-ignore
				        Attribute objclass = new BasicAttribute("objectclass");
				        objclass.add("top");
				        objclass.add("extensibleObject");
				        attrs.put(objclass);
				    
				        // Create the object to be bound
				        Object obj = new SampleObjectImpl();
				    
				        // Create the context
				        ctx.bind("cn=Sample", obj, attrs);
				    } catch (NamingException e) {
				    }
				
							

相关资源