Apama 10.15.3 | Connecting Apama Applications to External Components | Correlator-Integrated Support for the Java Message Service (JMS) | Using the Java Message Service (JMS) | Getting started with simple correlator-integrated messaging for JMS | Adding and configuring connections
 
Adding and configuring connections
When you first add the correlator-integrated messaging for JMS bundle to an Apama project, the list of connections is initially empty. You can add one or more connection to JMS providers.
*To establish a connection to a JMS broker
1. In the Project Explorer, expand the project's Connectivity and Adapters node and then expand the JMS (Correlator-integrated support for the Java Message Service) node.
2. Double-click the adapter's instance. This opens the instance's configuration in the editor for the correlator-integrated adapter for JMS.
3. In the adapter editor's Settings tab, click the Add Connection button (Plus icon) to display the JMS Configuration Wizard.
4. In the JMS Configuration Wizard, specify the following:
a. JMS Provider, select from the drop-down list.
b. Connection ID must be unique. The connection ID is used throughout the configuration files and Apama application to identify this broker connection. The value for the connection ID should not contain any spaces. The connection ID is used when sending JMS messages from the Apama application. This Apama connection ID is not exposed to the JMS provider in any way.
c. Description is optional and currently unused.
5. Click Next.
6. The Classpath details page of the JMS Configuration Wizard displays the default classpath details for the JMS provider that you selected in the previous step. Add or modify the values as appropriate for your environment.
To add or modify the classpath details:
a. The Select Installation Directory field lists the default directory where the JMS provider's JAR files are located. You can change this directory by clicking the browse button (...).
b. To add an entry to the CLASSPATH, click the Add Classpath button (+) and add the new value in the Add Classpath Variable dialog. You can also remove an entry by selecting it and clicking the Remove Classpath button (x).
7. Click Next to proceed to the Connection Properties page of the JMS Configuration Wizard. If necessary, add or modify the values as appropriate.
a. The Use JNDI checkbox indicates the usage of JNDI by JMS providers. For JMS providers that use JNDI, the checkbox is selected. For providers that do not support JNDI, the checkbox is not selected. It is not possible to change the value of the Use JNDI checkbox. If necessary, you can edit the generated XML file after completing the wizard to change how the connection factory is instantiated. For more information about customizing the XML, see XML configuration bean reference and Spring Beans documentation.
b. By default, the JMS Configuration Wizard lists a subset of standard connection properties. If Use JNDI is enabled, the connection details field shows JNDI Environment properties. If Use JNDI is not enabled, the connection details field shows ConnectionFactory properties. To show the complete list of properties, select the Show advanced properties check box.
c. You can add and remove properties and you can modify the properties' values. To modify a value, click in the Value column and enter the required information.
Note: 
If you are using JNDI to get the connection factory, it is usually necessary to first add and configure a JNDI name for the connection factory you wish to use using the administration tools provided by the JMS implementation you are using. For example, if using Universal Messaging, this would be the Enterprise Manager tool. A common mistake when configuring the JNDI connection factory binding is to use localhost rather than a fully qualified host name or IP address. For many JMS implementations, this will not permit connections from hosts other than the one that the server is running on.
8. Click Finish.
The adapter editor is updated to display the new connection in the JMS Connections section.
After you establish a connection to a JMS broker, you need to add JMS receivers and specify mapping configurations for receivers and senders.