配置数据库适配器

使用 wsadmin 命令可配置数据库适配器。

关于此任务

如果未指定 repositoriesForGroups 参数,那么存储库中的组将仅接受此同一存储库中的成员。存储库中的组始终支持该同一存储库中的成员。不需要为存储库的标识设置 repositoriesForGroups 参数。

如果存储库支持其他存储库中的成员,那么必须指定 repositoriesForGroups 参数,以将这些存储库的唯一存储库标识添加到此存储库。指定 repositoriesForGroups 参数时,将忽略同一存储库中的组。
注: 只有数据库存储库中的组现成支持其他存储库中的成员。文件存储库和 LDAP 存储库(包括具有多个域的 Microsoft Active Directory)不支持来自其他存储库的成员。

例如,如果希望数据库存储库中的组接受 LDAP 存储库中的成员,需要将 LDAP 存储库的配置参数 repositoriesForGroups 设置为数据库存储库的存储库标识。

以下代码样本是已配置为使用数据库存储库 (DB1) 和 LDAP 存储库 (LDAP1) 的基本 wimconfig.xml 文件的示例。可以修改以斜体显示的相应值。

 <config:repositories xsi:type="config:DatabaseRepositoryType" 
                    adapterClassName="com.ibm.ws.wim.adapter.db.DBAdapter"
                    id="DB1" 
                    supportPaging="false" 
                    databaseType="db2" 
                    dataSourceName="jdbc/wimDS" 
                    dbURL="jdbc:db2:wim" 
                    dbAdminId="DB_ADMIN_ID" 
                    dbAdminPassword="DB_PASSWORD" 
                    encryptionKey="rZ15ws0ely9yHk3zCs3sTMv/ho8fY17s" 
                    entityRetrievalLimit="200" 
                    saltLength="12">
   <config:baseEntries name="o=default organization"/>
   <config:loginProperties>uid</config:loginProperties>
 </config:repositories>

 <config:repositories xsi:type="config:LdapRepositoryType" id="LDAP1" supportPaging="true"
        supportSorting="true" ldapServerType="IDS">
      <config:baseEntries name="cn=users,dc=yourco,dc=com"/>
      <config:baseEntries name="cn=groups,dc=yourco,dc=com"/>
      <config:repositoriesForGroups>DB1</config:repositoriesForGroups>
      <config:ldapServerConfiguration>
        <config:ldapServers bindDN="cn=root" bindPassword="{xor}Nj0y" sslEnabled="false">
          <config:connections host="localhost" port="389"/>
        </config:ldapServers>
      </config:ldapServerConfiguration>
      <config:ldapEntityTypes name="PersonAccount">
        <config:objectClasses>inetOrgPerson</config:objectClasses>
        <config:searchBases>cn=users,dc=yourco,dc=com</config:searchBases>
      </config:ldapEntityTypes>
      <config:ldapEntityTypes name="Group">
        <config:objectClasses>groupOfNames</config:objectClasses>
        <config:searchBases>cn=groups,dc=yourco,dc=com</config:searchBases>
      </config:ldapEntityTypes>
      <config:ldapEntityTypes name="OrgContainer">
        <config:rdnAttributes name="o" objectClass="organization"/>
        <config:rdnAttributes name="ou" objectClass="organizationalunit"/>
        <config:objectClasses>organization</config:objectClasses>
        <config:objectClasses>organizationalUnit</config:objectClasses>
      </config:ldapEntityTypes>
      <config:groupConfiguration>
        <config:memberAttributes dummyMember="uid=dummy" name="member" objectClass="groupOfNames"/>
        <config:membershipAttribute name=""/>
      </config:groupConfiguration>
      <config:attributeConfiguration>
        <config:attributes name="userPassword" propertyName="password"/>
        <config:attributes name="cn" propertyName="displayName">
          <config:entityTypes>Group</config:entityTypes>
        </config:attributes>
        <config:attributes name="cn" propertyName="cn">
          <config:entityTypes>Group</config:entityTypes>
        </config:attributes>
        <config:propertiesNotSupported name="homeAddress"/>
        <config:propertiesNotSupported name="businessAddress"/>
      </config:attributeConfiguration>
      <config:contextPool enabled="true" initPoolSize="1" maxPoolSize="10" 
                                  poolTimeOut="0" prefPoolSize="5"/>
      <config:cacheConfiguration>
        <config:attributesCache cacheSize="4000" cacheTimeOut="1200"
            enabled="true" cacheDistPolicy="none"/>
        <config:searchResultsCache cacheSize="2000" cacheTimeOut="600"
            enabled="true" searchResultSizeLimit="1000" cacheDistPolicy="none"/>
      </config:cacheConfiguration>
    </config:repositories>
提示: 在要创建联合存储库表的位置,可以指定用户定义的数据库模式。将 dbSchema 参数和 tablespacePrefix 参数(tablespacePrefix 仅用于 DB2 for z/OS)与 setupIdMgrDBTablesdeleteIdMgrDBTablescreateIdMgrDBRepositoryupdateIdMgrDBRepository wsadmin 命令一起使用。

在 DB2 for z/OS 上创建联合存储库表时,还可以指定用户定义的缓冲池。将 tablesBufferPoolLOBtablesBufferPoolindextablesBufferPool 参数用于 setupIdMgrDBTables wsadmin 命令。

有关这些命令的更多信息,请参阅 WebSphere Application Server 信息中心中的主题 IdMgrRepositoryConfig command group for the AdminTask objectSetting up an entry mapping repository, a property extension repository, or a custom registry database repository using wsadmin commands



使用条款 | 反馈