Sun Identity Manager 8.1 业务管理员指南

将管理对象存储到 LDAP 目录

可以将 PasswordSync 和 JMS 侦听器配置为使用 LDAP 目录中存储的管理对象。图 11–14 展示了该过程。PasswordSync Servlet 和 JMS 侦听器适配器必须从 LDAP 目录中检索连接工厂和目的地设置才能发送和接收消息。

图 11–14 从 LDAP 目录中检索连接工厂和目的地对象

该图展示了如何将 PasswordSync 和 JMS 侦听器配置为使用 LDAP 目录中存储的管理对象

使用 Message Queue 命令行工具

本节介绍了如何使用 Message Queue 命令行工具 (imqobjmgr) 将受管理对象存储到 LDAP 目录中。

存储连接工厂对象

打开 Message Queue 命令行工具 (imqobjmgr),然后键入存储连接工厂对象中的命令以存储连接工厂对象。


示例 11–1 存储连接工厂对象


#> ./imqobjmgr add -l "cn=mytestFactory" 
-j "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory" 
-j "java.naming.provider.url=ldap://gwenig.coopsrc.com:389/ou=sunmq,dc=coopsrc,dc=com" 
-j "java.naming.security.principal=cn=directory manager" 
-j "java.naming.security.credentials=password" 
-j "java.naming.security.authentication=simple" 
-t qf -o "imqAddressList=mq://gwenig.coopsrc.com:7676/jms" 
Adding a Queue Connection Factory object with the following attributes: 
imqAckOnAcknowledge [Message Service Acknowledgement of Client Acknowledgements] ... 
imqSetJMSXUserID [Enable JMSXUserID Message Property] false 
Using the following lookup name: cn=mytestFactory The object’s read-only state: false 
To the object store specified by: 
java.naming.factory.initial com.sun.jndi.ldap.LdapCtxFactory 
java.naming.provider.url 
ldap://gwenig.coopsrc.com:389/ou=sunmq,dc=coopsrc,dc=com 
java.naming.security.authentication 
simple java.naming.security.credentials netscape
java.naming.security.principal 
cn=directory manager Object successfully added.

存储连接工厂对象中,imqAddressList 定义了 JMS 服务器/代理主机名 (gwenig.coopsrc.com)、端口 (7676) 以及访问方法 (jms)。

存储目的地对象

在 Message Queue 命令行工具 (imqobjmgr) 中,键入存储目的地对象中的命令以存储目的地对象。


示例 11–2 存储目的地对象


#> ./imqobjmgr add -l "cn=mytestDestination" 
-j "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory" 
-j "java.naming.provider.url=ldap://gwenig.coopsrc.com:389/ou=sunmq,dc=coopsrc,dc=com" 
-j "java.naming.security.principal=cn=directory manager" 
-j "java.naming.security.credentials=password" 
-j "java.naming.security.authentication=simple" 
-t q -o "imqDestinationName=mytestDestination" 
Adding a Queue object with the following attributes: 
imqDestinationDescription [Destination Description] 
A Description for the Destination Object imqDestinationName [Destination Name] 
mytestDestination Using the following lookup name: cn=mytestDestination 
The object’s read-only state: false 
To the object store specified by: 
java.naming.factory.initial com.sun.jndi.ldap.LdapCtxFactory 
java.naming.provider.url ldap://gwenig.coopsrc.com:389/ ou=sunmq,dc=coopsrc,dc=com 
java.naming.security.authentication simple 
java.naming.security.credentials netscape 
java.naming.security.principal cn=directory manager Object successfully added.

您可以使用 ldapsearch 或 LDAP 浏览器来查看新创建的对象。

有关在 LDAP 服务器上存储受管理对象的一节到此结束。请跳过下一节(介绍如何在文件中存储管理对象),并转到为该方案配置 JMS 侦听器适配器上的一节。