JMS Queues/Topics as a Replication Target

The Open Systems Event Replicator supports replicating to the JMS Queues and Topics.  The process of replicating to a JMS Queue or Topic is the same as replicating to a relational target such as SQL Server or Oracle except that the data placed on the JMS Queue or Topic is in xml format rather than being put directly into a physical database.

 

Start the CONNX JMS Server component

 

Configure a JMS Queue or Topic

 

Creating a CONNX JMS  CDD Entry  This includes:

  • Opening the CONNX Data Dictionary (CDD) Manager

  • Importing the JMS connection

  • Saving the CDD

 

Starting the CONNX JMS Server

The CONNX JMS server must be installed on the same platform in which the JMS Que/Topic provider resides. The CONNX JMS Server is a java program that communicates between CONNX and the JMS Queues/Topics. If the JMS provider resides on an UNIX Machine, additional installation steps must be done which are described below.

The CONNX JMS Server uses the Open Source Apache Logging Services for logging output.  This means that the Apache log4j.jar file must be present on the machine where the CONNX JMS Server and the JMS Messaging Server are installed.  The log4j.jar file can be downloaded from the Apache web site.

 

To install CONNX JMS Server on a Windows machine:

The JMS Server is automatically installed on Windows when JMS is selected during the Install.  To start the JMS Server, select "Start JMS Server" from the Start|Programs|CONNX JMS Server menu.  The first time the JMS Server is run, you will be prompted for the classpath to the log4j.jar file as well as the location of the JMS provider you wish to connect to.  The classpath information will be validated and once the information if found to be correct, the CONNX JMS Server will be started.

 
To install CONNX JMS Server on an Unix/Linux machine:
  1. On the Windows PC where CONNX is istalled, go to the Start|All Programs menu and select "UNIX Installer" from the Start|Programs|CONNX JMS Server menu.
  2. Fill in the dialog box and press Install.  (see "Installing JMS" in Chapter 2 - Event Replicator Installation for more information)
  3. This install program will ftp the JMS Server files to the Unix/Linux machine.
  4. Exit the install program and sign on to the Unix/Linux machine and run the script ./installjms.
  5. This will unpack the JMS Server and you will now have a new script called jmsserver.
  6. The file created is jmsserver. It is located in the connx subfolder under the installation directory. The first time this batch file is run, you will be prompted for the classpath to the log4j.jar file as well as the location of the JMS provider you wish to connect to.  The classpath information will be validated and once the information if found to be correct, the CONNX JMS Server will be started.
To start the JMS server component:
  1. Ensure that version 1.7 or higher of the JAVA Runtime Environment has been installed on your computer.
  2. Start the JMS Server
    • On Unix: execute the jmsserver script with the start paramater.  e.g. ./jmsserver start.  Use the stop paramater to stop the JMS Server. This script is located in the /connx folder.
    • On Windows: Go to the Start Menu and select "Start JMS Server" from the  CONNX JMS Server menu. This will start the JMS Server in a java command window. To terminate the server, use CTRL-C within the JMS Server command window.

Note: The JMS Server listens on port 7600 by default.  This can be changed on Windows by running "Configure JMS Server" from the CONNX JMS Server menu and on UNIX/Linux run the shell script jmsserver with the configure option (./jmsserver configure).

 

Note: The JMS Server Component must be started on the same platform in which the WebMethods Message Service Provider resides.

 

Create a JMS entry in the CDD:

 

To create the CONNX JMS CDD entry, bring up the "CONNX - CONNX Data Dictionary Manger and perform the following:

    1. Select the "Import" button

    2. In the "Import CDD" dialog, for "Import Type:", select "JMS Import"

    3. In the "JMS Server Name:" item, enter the machine name where the JMS server is running.  (for this example, it is assumed that the JMS server will be running on the local machine, so "localhost" is used).

    4. Leave the "JMS Port:" as is (port 7600).  If you changed the "listening port" when starting up the cnxJMSserver.jar, then this value must match the value you specified at that time.

    5. Under the "Application Server Logon Information" tab, the "Application Server Type:" select the Application Server Type you wish to connect to.  Universal Messaging Server is selected by default.  Note, if JNDI Properties File is selected, the JNDI Properties file needs to be located in the same location as the CONNX JMS Server.  There is a sample JNDI.properties file called JNDI.properties.sample in this location.  You can copy it and name the copy JNDI.properties and then modify that file.

    6. If  Universal Messaging Server, Glassfish or webMethods is selected, "Application Server URL:" will be set to the defaults for the selected type.  The name of the server will be auto filled from the JMS Server Name.  While the JMS Server Name can be "localhost" or 127.0.0.1, the server name specified in the Application Server URL CANNOT be "localhost" or 127.0.0.1.  A valid DNS host name or IP address (other than local loopback) must be used.  It is recommended that the JMS Server Name also be the DNS name or IP address of the server.

    7. If JNDI Properties File is selected, the values will be read from jndi.properties which should be located in the same location as the JMS Server.  A sample file named jndi.properties.sample is provided and is located in \connx32\connxjms on Windows and in the connx directory on UNIX/Linux.  This file can be modified and saved as jndi.properties.

    8. Leave "UserName:" and "Password:" entries blank unless a user name and password has been associated with the JMS queue.  In that case, use the appropriate values.

    9. In the "Factory Name:" item, enter the Factory Name you wish to use.

    10. In the "JMS Destination:" item, enter the Queue Name or Topic Name you wish to connect to.

      jms_import.bmp

    11. Enter "OK".

    12. An attempt will be made to connect to the webMethods Message Service Provider.  If everything went ok, you should see an entry added to the CONNX Data Dictionary.
      jms_imported.bmp

    13. Select File from the menu and then Save.