WebSphere Application Server - Express, Version 6.1   
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows, Windows Vista

             目次と検索結果のパーソナライズ化

wsadmin を使用したフェデレーテッド・リポジトリーのカスタム・アダプターの構成

Jython または Jacl スクリプト言語を wsadmin ツールとともに使用して、 フェデレーテッド・リポジトリー構成ファイルにカスタム・アダプターを定義できます。

始める前に

アプリケーション・サーバーをシャットダウンします。

このタスクについて

フェデレーテッド・リポジトリー構成ファイル wimconfig.xml は、 WebSphere Application Server 6.1.x でサポートされており、app_server_root/profiles/profile_name/config/cells/cell_name/wim/config ディレクトリーにあります。
注: このトピックで使用するコマンドに関する追加情報については、 AdminTask オブジェクトの IdMgrRepositoryConfig コマンド・グループ を参照してください。

以下のステップを使用して、フェデレーテッド・リポジトリー構成ファイルと、 構成ファイル内で定義されているレルムに、カスタム・アダプターを追加します。

プロシージャー

  1. テキスト・エディターで wimconfig.xml ファイルを開きます。
  2. ファイルに新規の config:repositories エレメントを追加します。 このエレメントは、config:realmConfiguration エレメントの前に配置します。
    次の例では、com.ibm.ws.wim.adapter.sample.SampleFileAdapter クラスを使用するようにカスタム・リポジトリーを構成し、 SampleFileRepository リポジトリーを ID として設定します。
    <config:repositories adapterClassName="com.ibm.ws.wim.adapter.sample.SampleFileAdapter" 
    id="SampleFileRepository"/>
  3. wimconfig.xml ファイルを保管し、テキスト・エディターを閉じます。
  4. 提供された vmmsampleadapter.jar ファイルを app_server_root/lib にコピーします。
  5. 次のコマンドを入力して、wsadmin ツールを開始します。
    wsadmin –conntype none
  6. 共通リポジトリー構成内のページングを使用不可にします。 ページングを使用不可にするには、 updateIdMgrRepository コマンドの supportPaging パラメーターを false に設定します。
    注: サンプル・アダプターはページングをサポートしていないため、このステップを実行する必要があります。

    以下の例では、SampleFileRepository リポジトリーをカスタム・リポジトリーの ID として使用します。

    Jython を使用:
    AdminTask.updateIdMgrRepository('-id SampleFileRepository -supportPaging false')
    Jacl を使用:
    $AdminTask updateIdMgrRepository {-id SampleFileRepository -supportPaging
    false}
    
    注: サンプル・リポジトリーの構成が完了するまで、警告が表示されます。
  7. アダプターのための必要なカスタム・プロパティーを追加します。 複数のプロパティーを追加するには、setIdMgrCustomProperty コマンドを繰り返し使用します。 複数のプロパティーを構成に追加する場合、このコマンドは、プロパティーごとに 1 回使用します。 指定したリポジトリーのカスタム・プロパティーを追加する場合、 「名前」と「」の両方のパラメーターを使用する必要があります。 例えば、fileName というカスタム・プロパティーを追加するには、次のコマンドを入力します。
    注: SampleFileRepository を使用する場合は、 次の例のファイルが実装により作成されます。
    Jython を使用:
    AdminTask.setIdMgrCustomProperty('-id SampleFileRepository 
    -name fileName -value "c:¥sampleFileRegistry.xml"')
    
    Jacl を使用:
    $AdminTask setIdMgrCustomProperty {-id SampleFileRepository -name fileName
    -value "c:¥sampleFileRegistry.xml"}
    
  8. アダプター構成にベース・エントリーを追加します。 次の例の addIdMgrRepositoryBaseEntry コマンドを使用して、 指定したリポジトリーのベース・エントリーの名前を指定します。
    Jython を使用:
    AdminTask.addIdMgrRepositoryBaseEntry('-id SampleFileRepository 
    -name o=sampleFileRepository')
    
    Jacl を使用:
    $AdminTask addIdMgrRepositoryBaseEntry {-id SampleFileRepository 
    -name o=sampleFileRepository}
  9. addIdMgrRealmBaseEntry コマンドを使用して、レルムにベース・エントリーを追加します。 これにより、レルムがリポジトリーにリンクされます。
    注: デフォルト・レルム名は defaultWIMFileBasedRealm です。 このレルム名を名前変更した場合は、defaultWIMFileBasedRealm の代わりに新規レルム名を使用します。
    Jython を使用:
    AdminTask.addIdMgrRealmBaseEntry('-name defaultWIMFileBasedRealm 
    -baseEntry o=sampleFileRepository')
    
    Jacl を使用:
    $AdminTask addIdMgrRealmBaseEntry {-name defaultWIMFileBasedRealm 
    -baseEntry o=sampleFileRepository}
    
  10. 構成の変更を保管します。 以下のコマンドを入力して、 新規構成を保管し、wsadmin ツールを閉じます。
    Jython を使用:
    AdminConfig.save()exit
    Jacl を使用:
    $AdminConfig save
    exit
    次の例では、新規に改訂された wimconfig.xml ファイルの完全なテキストを表示します。
    <!--
      Begin Copyright
    
      Licensed Materials - Property of IBM
    
      virtual member manager
    
      (C) Copyright IBM Corp. 2005 All Rights Reserved.
    
      End Copyright
    -->
    <sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:config="http://www.ibm.com/websphere/wim
    /config" xmlns:sdo="commonj.sdo">
      <config:configurationProvider maxPagingResults="500" maxSearchResults="4500" maxTotalPagingResults="1000" 
    pagedCacheTimeOut="900" pagingEntityObject="true" searchTimeOut="600000">
        <config:dynamicModel xsdFileName="wimdatagraph.xsd"/>
        <config:supportedEntityTypes defaultParent="o=defaultWIMFileBasedRealm" name="Group">
          <config:rdnProperties>cn</config:rdnProperties>
        </config:supportedEntityTypes>
        <config:supportedEntityTypes defaultParent="o=defaultWIMFileBasedRealm" name="OrgContainer">
          <config:rdnProperties>o</config:rdnProperties>
          <config:rdnProperties>ou</config:rdnProperties>
          <config:rdnProperties>dc</config:rdnProperties>
          <config:rdnProperties>cn</config:rdnProperties>
        </config:supportedEntityTypes>
        <config:supportedEntityTypes defaultParent="o=defaultWIMFileBasedRealm" name="PersonAccount">
          <config:rdnProperties>uid</config:rdnProperties>
        </config:supportedEntityTypes>
        <config:repositories xsi:type="config:FileRepositoryType" adapterClassName="com.ibm.ws.wim.adapter.file.was.FileAdapter" 
    id="InternalFileRepository" supportPaging="false" supportSorting="false" messageDigestAlgorithm="SHA-1">
          <config:baseEntries name="o=defaultWIMFileBasedRealm"/>
        </config:repositories>
        <config:repositories adapterClassName="com.ibm.ws.wim.adapter.sample.SampleFileAdapter†id=" SampleFileRepository="">
          <config:CustomProperties name="fileName" value="c:¥sampleFileRegistry.xml"/>
          <config:baseEntries name="o=sampleFileRepository"/>
        </config:repositories>
        <config:realmConfiguration defaultRealm="defaultWIMFileBasedRealm">
          <config:realms delimiter="@" name="defaultWIMFileBasedRealm" securityUse="active">
            <config:participatingBaseEntries name="o=defaultWIMFileBasedRealm"/>
            <config:participatingBaseEntries name="o=sampleFileRepository"/>
            <config:uniqueUserIdMapping propertyForInput="uniqueName" propertyForOutput="uniqueName"/>
            <config:userSecurityNameMapping propertyForInput="principalName" propertyForOutput="principalName"/>
            <config:userDisplayNameMapping propertyForInput="principalName" propertyForOutput="principalName"/>
            <config:uniqueGroupIdMapping propertyForInput="uniqueName" propertyForOutput="uniqueName"/>
            <config:groupSecurityNameMapping propertyForInput="cn" propertyForOutput="cn"/>
            <config:groupDisplayNameMapping propertyForInput="cn" propertyForOutput="cn"/>
          </config:realms>
        </config:realmConfiguration>
    </config:configurationProvider></sdo:datagraph>
  11. アプリケーション・サーバーを再始動します。



関連資料
フェデレーテッド・リポジトリーのサンプル・カスタム・アダプターの例
関連情報
AdminTask オブジェクトの IdMgrRepositoryConfig コマンド・グループ
タスク・トピック    

ご利用条件 | フィードバック

最終更新: Jan 21, 2008 6:25:35 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/txml_config_vmmca.html