Este contenido no está disponible en el idioma seleccionado.

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
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat