Home page  
Help > SDK Help > Other Help >
Java Message Queue Setup
Version 7.11

Setting up JMS.. 1

Setup Instructions for Java Message Queue. 4

Windows Installation. 4

Unix Installation. 5

Setting up JMS

For certain configurations, EIQ RTIS requires a Message Queue. This document describes the Java Message Queue and how to set it up for real-time updates from EIQ RTIS.

 

The Java Message Queue can be installed on any available server. The generated “.bindings” file must be copied to the computer running EIQ RTIS and placed in the JMSConnectionFactory folder.

 

In a multiple server setup, the “.bindings” file generated by the "Java Message Queue Administration Console" must be copied to the JMSConnectionFactory folder for the Database Server and EIQ RTIS computers when using the Trigger DLL as shown in Figure 1. EIQ RTIS can be configured to both monitor the data source for transaction logs to send the information to a queue and then monitor that queue for messages.

 

Figure 1: JMS Setup for a Multiple Server Installation using the Trigger DLL.

 

If the multiple server installation uses the EIQ RTIS, the “.bindings” file must also be copied to the computer running EIQ RTIS as shown in Figure 2.

 

Figure 2: JMS Setup for a Multiple Server Installation using EIQ RTIS.

 

The setup shown in Figure 2 uses EIQ RTIS. It replaces the database triggers and the Trigger DLL.

 

Note: Data source triggers are NOT the preferred method to capture changed data in the real-time update process because they require installation on data source systems and impose an operational overhead. EIQ RTIS is the preferred method to read transaction, change, and redo logs.

 

Setup Instructions for Java Message Queue

Install the Message Queue following the Sun Java System Message Queue 3.5 SP1 Installation Guide. Then, perform the following steps for a Windows or Unix installation:

Windows Installation

These are the steps to install JMS on a Windows based system.

 

Message Queue Server

 

The following steps apply to the computer running the Java Message Queue server.

1.    Using the "Sun Java System Message Queue Administration Console", create an Object Store labeled "WhamTechMessages" with the following Name/Value properties.

 

Name: java.naming.factory.initial

Value: com.sun.jndi.fscontext.RefFSContextFactory

 

Name: java.naming.provider.url

Value: file:///C:/Program Files/WhamTech/JMSConnectionFactory

2.    Add a Connection Factory Object with the following properties:

 

Lookup Name: EIQQueueConnectionFactory

Factory Type: QueueConnectionFactory

3.    Add Destination Objects with the following properties:

 

Lookup Name: scott

Destination Type: Queue

Destination Name: scott

 

“Lookup Name” is the value of the QueueParam in your database trigger.

 

A Destination Object must be created for each trigger with a unique QueueParam value.

4.    Optionally, you can add the Destinations to the Broker Destinations.

 

EIQ RTIS

 

The following steps apply to the computer running EIQ RTIS.

 

Environment Variables:

 

You must manually add the path of the installed jvm.dll file to the Path variable in the System variables section of the Environment Variables dialog as follows:

 

C:\Program Files\Whamtech\bin\java\jre\bin\client

 

This path is created assuming you installed the EIQ Server Suite on drive C in the default folder \Program Files\Whamtech.

 

Registry Additions:

 

A new key needs to be added as a sub key to WhamTech under HKEY_LOCAL_MACHINE as follows: (\HKEY_LOCAL_MACHINE\SOFTWARE\WhamTech\JMS)

 

            WhamTech

                        JMS

 

With the following Name, Type and Data values:

 

            Name: BindingsFolder

            Type: REG_SZ

            Data: file:///Installation Path/WhamTech/JMSConnectionFactory

 

Name: ClassPath

Type: REG_SZ

Data: Installation folder\WhamTech\bin\Java;

Installation folder\WhamTech\bin\Java\jms.jar;

Installation folder\WhamTech\bin\Java\imq.jar;

Installation folder\WhamTech\bin\Java\fscontext.jar;

Installation folder\WhamTech\bin\Java\providerutil.jar

 

Installation folder is the installed folder, for example "C:/Program Files". The path specified for the BindingsFolder key is where you copy the “.bindings” file generated by the “Java Message Queue Administration Console”.

 

The queue type must also be added to the registry under the following HKEY_LOCAL_MACHINE\SOFTWARE\WhamTech keys:

 

xpWhamTx

xpWhamTxOra

 

Name: QueueType

Type: REG_DWORD

Data: 0 or 1

 

Where:

0 - sends message to the MSMQ queue on the specified server

1 - sends message to the JMS queue using the .bindings file

Unix Installation

1.    Using the "Sun Java System Message Queue Administration Console", create an Object Store labeled "WhamTechMessages" with the following Name/Value properties.

 

Name: java.naming.factory.initial

Value: com.sun.jndi.fscontext.RefFSContextFactory

 

Name: java.naming.provider.url

Value: file:///usr/whamtech/JMSConnectionFactory

2.    Add a Connection Factory Object with the following properties:

 

Lookup Name: EIQQueueConnectionFactory

Factory Type: QueueConnectionFactory

3.    Add Destination Objects with the following properties:

 

Lookup Name: scott

Destination Type: Queue

Destination Name: scott

 

“Lookup Name” is the value of the QueueParam in your database trigger.

 

A Destination Object must be created for each trigger with a unique QueueParam value.

4.    Optionally, you can add the Destinations to the Broker Destinations.

 

Unix Directory Structure:

 

You should use the following Unix directory structure:

 

WhamTech structure:

/usr/whamtech/bin - libwhamtxora.so (Oracle extended procedure)

/usr/whamtech/bin - trigger.cfg (configuration file used by libwhamtxora.so)

..jre/lib/ext - whamtech.jar (java JMS code)

/usr/whamtech/JMSConnectionFactory - .bindings

 

The whamtech.jar file must be an installed extension. Place this file in the JRE's lib/ext directory.

 

Note: The Unix substitute for the Windows registry is to read the configuration information from a file. This file is trigger.cfg and it must be placed in /usr/whamtech/bin because this path is hard coded in the shared library, “libwhamtxora.so”.

 

Changes to user .profile:

 

Basically, the PATH statement needs to include directories that contain common java and JMS components like the following:

PATH=.:/usr/bin:/usr/lib:/usr/share/lib:/usr/ucb:/etc:/user/local/bin:/usr/sfw/bin:

/opt/csw/bin:/export/home/local/bin:/usr/dt/bin

export PATH

 

The CLASSPATH statement should contain the paths to the following message queuing JMS jar files:

CLASSPATH=.:/usr/share/lib/jms.jar:/usr/share/lib/imq.jar:/usr/share/lib/fscontext.jar

export CLASSPATH

 

The LD_LIBRARY_PATH statement should contain the location for the jre and the libwhamtxora.so file.

LD_LIBRARY_PATH=/usr/jdk/instances/jdk1.5.0/jre/lib/i386/client:/usr/whamtech/bin

export LD_LIBRARY_PATH

 

Changes to Oracle .profile:

 

The Oracle .profile must include the following entries.

 

CLASSPATH=.:/usr/share/lib/jms.jar:/usr/share/lib/imq.jar:/usr/share/lib/fscontext.jar

export CLASSPATH

LD_LIBRARY_PATH=/usr/jdk/instances/jdk1.5.0/jre/lib/i386/client

export LD_LIBRARY_PATH

 

Changes to Oracle .ora files:

 

The following highlighted changes are required to the “listener.ora” and “tnsnames.ora” files.

 

listener.ora

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

      )

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = SunRay)(PORT = 1521))

      )

    )

  )

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /export/home/oracle/OraHome_1)

      (PROGRAM = extproc)

      (ENVS="EXTPROC_DLLS=ANY")

    )

    (SID_DESC =

      (GLOBAL_DBNAME = wham.corp.whamtech.com)

      (ORACLE_HOME = /export/home/oracle/OraHome_1)

      (SID_NAME = wham)

    )

  )

 

tnsnames.ora

 

EXTPROC_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

    )

    (CONNECT_DATA =

      (SID = PLSExtProc)(PRESENTATION = RO)

    )

  )

 

 

 

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.