PasswordSync と JMS リスナーは、ファイルに格納されている管理オブジェクトを使用するように設定できます。管理オブジェクトを LDAP サーバーに格納 (「LDAP ディレクトリへの管理オブジェクトの格納」) していない場合は、この節の手順に従います。
Message Queue コマンド行ツール (imqobjmgr) を開き、「接続ファクトリオブジェクトの格納」のコマンドを入力して、接続ファクトリオブジェクトを格納し、ルックアップ名を指定します。
#> ./imqobjmgr add -l "mytestFactory" -j "java.naming.factory.initial= com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:///home/gael/tmp" -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: mytestFactory The object’s read-only state: false To the object store specified by: java.naming.factory.initial com.sun.jndi.fscontext.RefFSContextFactory java.naming.provider.url file:///home/gael/tmp Object successfully added. To specify a destination: #> ./imqobjmgr add -l "mytestQueue" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:///home/gael/tmp" -t q -o "imqDestinationName=myTestQueue" Adding a Queue object with the following attributes: imqDestinationDescription [Destination Description] A Description for the Destination Object imqDestinationName [Destination Name] myTestQueue Using the following lookup name: mytestQueue The object’s read-only state: false To the object store specified by: java.naming.factory.initial com.sun.jndi.fscontext.RefFSContextFactory java.naming.provider.url file:///home/gael/tmp Object successfully added. |
Sun Message Queue ブローカでは、デフォルトでキューデスティネーションの自動作成が有効になっています (config.properties を参照。 ただし、imq.autocreate.queue のデフォルト値は true)。
キューデスティネーションが自動的に作成されない場合は、「ブローカでのデスティネーションの作成」に示すコマンドを使用して、ブローカ上でデスティネーションオブジェクトを作成する必要があります。このとき、myTestQueue がデスティネーションを表します。
name (Queue name): #> cd /opt/sun/mq/bin #>./imqcmd create dst -t q -n mytestQueue Username: <admin> Password: <admin> Creating a destination with the following attributes: Destination Name mytestQueue Destination Type Queue On the broker specified by: ------------------------- Host Primary Port ------------------------- localhost 7676 Successfully created the destination. |
ディレクトリまたはファイルに管理オブジェクトを格納できます。
ディレクトリの場合: ディレクトリを使用すると、接続ファクトリオブジェクトとデスティネーションオブジェクトを一元的に格納することができます。
ディレクトリを使用する場合、これらの管理オブジェクトはディレクトリエントリとして格納されます。
Identity Manager PasswordSync サーブレットと Identity Manager サーバーが同一のマシンに置かれていない場合は、それぞれから .bindings ファイルにアクセスできる必要があります。管理オブジェクトの作成をそれぞれのマシンでもう一度繰り返しても、.bindings ファイルを各マシンの適切な場所にコピーしてもかまいません。
ファイルの場合: Identity Manager PasswordSync サーブレットと Identity Manager サーバーの両方が、同一のサーバー上で実行されている (つまり、ディレクトリが使用可能でない) 場合は、ファイルに管理オブジェクトを格納できます。
ファイルを使用する場合、両方の管理オブジェクトは java.naming.provider.url に対して指定したディレクトリ (たとえば、Windows では file:///c:/temp、UNIX では file:///tmp ) 以下に、単一のファイル (Windows と UNIX のどちらでも .bindings ファイル) に格納されます。