此内容没有您所选择的语言版本。

Chapter 7. Remote JNDI Lookup


7.1. Registering Objects to JNDI

The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up objects using a name. To look up an object, you must first register that object to JNDI using the java:jboss/exported context.
The following is an example of how to register a JMS queue to JNDI in the messaging subsystem so that it can be looked up by remote JNDI clients.
java:jboss/exported/jms/queue/myTestQueue
Copy to Clipboard Toggle word wrap
Remote JNDI clients can then look up the object using the above name; however, it is not necessary to specify the java:jboss/exported/ prefix when looking up a remote client. The remote JNDI clients can look up the remote object up using the following name.
jms/queue/myTestQueue
Copy to Clipboard Toggle word wrap

Example 7.1. Example of Standalone Server JMS Queue Configuration

<subsystem xmlns="urn:jboss:domain:messaging:1.4">
   <hornetq-server>
      ...
      <jms-destinations>
         <jms-queue name="myTestQueue">
            <entry name="java:jboss/exported/jms/queue/myTestQueue"/>
         </jms-queue>
      </jms-destinations>
   </hornetq-server>
</subsystem>
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat