Configuring the jndi.properties file

You must configure the jndi.properties file. JMS clients use property files to create a JNDI IntialContextFactory. If you put the JNDI configuration in the jndi.properties file and place this file on your class path, you can access the InitialContext and you can search for the ConnectionFactory objects and destinations.

About this task

Note: If you get the javax.naming.NamingException, it means that the jndi.properties file is not accessible. Ensure that the jndi.properties file is packaged in a custom JAR and is installed as a third-party JAR for both APP and AGENT dynamic class paths.

Procedure

  1. Create the jndi.properties file based on the information in the Apache ActiveMQ Artemis documentation.
    Sample of the content in the jdni.properties file:
    java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
    java.naming.provider.url=tcp://<IP address and port of the ActiveMQ Artemis instance>
    queue.<Queue Identifier>=<QUEUE_NAME>
    connectionFactory.<Connection Factory Identifier>=tcp://<IP address and port of the ActiveMQ Artemis instance>
    
  2. After the jndi.properties file is created, it must be accessible for the Sterling™ Order Management System Software application. The best way is to add the jndi.properties file to a JAR file and then add it to the class path.
  3. Create a custom JAR file. For example, artemis_custom.jar. Use the <INSTALL_DIR>/bin/install3rdparty.sh script to install the artemis_custom.jar file and include it in the AGENTDynamicclasspath.cfg and APPDynamicclasspath.cfg dynamic class path file.
    Note: For applications such as the Application Server or the Agent Server in Sterling Order Management System Software where the jndi.properties file is packaged in a JAR and is added in the class path during the launch, any update in the jndi.properties file requires an update in the jar/war/ear and redeployment of the application.