OpenJMS uses JNDI (the Java Naming and Directory Interface), to make connection factories, topics, and queues available to clients.

OpenJMS can be configured to use an embedded JNDI provider, or an external JNDI provider.

Configuring the embedded JNDI provider

By default, OpenJMS uses an embedded JNDI provider. This is specified by the <ServerConfiguration> element in the $OPENJMS_HOME/config/openjms.xml configuration file:

  <ServerConfiguration embeddedJNDI="true"/>

Configuring an external JNDI provider

To configure an external JNDI provider, the $OPENJMS_HOME/config/openjms.xml configuration file needs to be modified:

  1. The embeddedJNDI attribute of the <ServerConfiguration> element needs to be set to "false"
  2. The <JndiConfiguration> element needs to be specified.

    This lists the connection properties of the external provider.

  <ServerConfiguration embeddedJNDI="false" />

    <property name="java.naming.factory.initial"
              value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
    <property name="java.naming.provider.url"
              value="rmi://localhost:1099" />