Set the JNDI Configuration Properties
JNDI configuration When using JNDI from the client side you need to specify a set of JNDI properties which tell the JNDI client where to locate the JNDI server, amongst other things. These are often specified in a file called jndi.properties on the client classpath, or you can specify them directly when creating the JNDI initial context. A full JNDI tutorial is outside the scope of this document, please see the Sun JNDI tutorial for more information on how to use JNDI. For talking to the JBoss JNDI Server, the jndi properties will look something like this: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://myhost:1099 java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces Where myhost is the hostname or IP address of the JNDI server. 1099 is the port used by the JNDI server and may vary depending on how you have configured your JNDI server. In the default standalone configuration, JNDI server ports are configured in the file hornetq-beans.xml by setting properties on the JNDIServer bean: 1099 localhost 1098 localhost