第5章 リモート JNDI ルックアップ
5.1. Java Naming and Directory Interface へのオブジェクトの登録
Java Naming and Directory Interface は、Java ソフトウェアクライアントによる名前を使用したオブジェクトの検出およびルックアップを可能にするディレクトリーサービスの Java API です。
Java Naming and Directory Interface に登録されたオブジェクトが、別の JVM で実行されるクライアントなどのリモート Java Naming and Directory Interface クライアントによる検索が必要な場合は、java:jboss/exported
コンテキストで登録する必要があります。
たとえば、messaging-activemq
サブシステムの Jakarta Messaging キューをリモート Java Naming and Directory Interface クライアントに対して公開する必要がある場合は、java:jboss/exported/jms/queue/myTestQueue
を使用して Java Naming and Directory Interface に登録する必要があります。リモート Java Naming および Directory Interface クライアントは、名前 jms/queue/myTestQueue
で検索できます。
例: standalone-full(-ha).xml
のキューの設定
<subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0"> <server name="default"> ... <jms-queue name="myTestQueue" entries="java:jboss/exported/jms/queue/myTestQueue"/> ... </server> </subsystem>