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.
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"/>
To configure an external JNDI provider, the $OPENJMS_HOME/config/openjms.xml configuration file needs to be modified:
This lists the connection properties of the external provider.
<ServerConfiguration embeddedJNDI="false" /> <JndiConfiguration> <property name="java.naming.factory.initial" value="com.sun.jndi.rmi.registry.RegistryContextFactory" /> <property name="java.naming.provider.url" value="rmi://localhost:1099" /> </JndiConfiguration>