JMSConnect Testing Tool v4.0

Version 16

    Introduction

     

    A PowerExchange for JMS session may fail due to various JNDI/JMS connectivity  issues. The JMSConnectTest utility is to a Java based program which can be used  to test JNDI/JMS connectivity with any of the JMS providers (such as IBM  WebSphere MQ, IBM WebSphere Application Server, Apache AcitveMQ, etc.). The idea is to ensure that the same connection works outside of Informatica.

     

    Download

     

    • JMSConnectTest.class (See attachment below)

     

     

    Enhancements

     

    1. CLASSPATH and JAVA_HOME  need not be set manually to test a JMS connection. You can copy required jar files into a folder named javalib
    2. This tool can be tested with JNDI USERNAME and JNDI PASSWORD, JMS USERNAME and JMS PASSWORD.
    3. This tool can be tested with TextMessage and BytesMessage formats.

    Install and Run

     

    1. Logon as the Windows/UNIX user who starts the Informatica process.
    2. Download and unzip the attached file (JMSConnectTest.zip) to any directory on the machine hosting the Informatica server.
    3. The attached folder will contain three files:

      • javalib: This is a folder where you can add third party JMS Provider jar files

      • JMSConnectTest.jar : This is an exceutable jar to test the JMS connection

      • readme.txt: Instructions to run the tool

     

    On UNIX only:

     

    1. Transfer the file to the UNIX machine using FTP (in binary mode).
    2. Change permissions for the file:  chmod 755 *
    3. To run the tool, use the following syntax:

     

    java -jar JMSConnectTest.jar -c <context-factory-class> -p <provider-url> -j <jms-conn-factory-name> -d <jms-destination> -t <jms-type> [-ju <jndi-user> -jx <jndi-password>] [-mu <jms-user> -mx <jms-password>] [-n <num-msg-to-send>] [-s <sleep-interval(sec)-between-send>] [-sn <durable-subscriber-name>]

     

    Option

    Argument

    Description

    Type

    -c

    context-factory-class

    Specify the JNDI Connect Factory for your JMS provider

    Required

    -p

    provider-url

    Specify the JNDI Provider URL for your JMS provider

    Required

    -j

    jms-conn-factory-name

    Name of the connection factory. The name of the connection factory must

    be the  same as the connection factory name you configured in JNDI.

    Required

    -d

    jms-destination

    Name of the destination. The destination name must match the name you configured  in JNDI.

    Required

    -t

    jms-type

    Specify one of the following JMS Type:
    1: Send Messages to Queue,

    2:Receive Messages from Queue,

    3: Publish Messages to Topic,

    4: Receive Messages from Subscribed Topic

    Required

    -ju

    jndi-user

    JNDI user name

    Optional

    -jx

    jndi-password

    JNDI password

    Optional

    -mu

    jms-user

    JMS user name

    Optional

    -mx

    jms-password

    JMS password

    Optional

    -n

    num-msg

    Specify the number of message that you want to test with you JMS provider.

    The default is 1, one message.

    Optional

    -s

    sleep-interval(sec)-between-send

    Specify the number of seconds to wait between iterations.

    Optional

    -debugIs-debug-enabledBy default, it is set to “false”Optional

     

    Usage

     

    The below example is for Windows, for UNIX use the script runJMSConnectTest.sh instead.

     

    The example below is to illustrate how to run the utility on Windows/Unix:

     

    Send two messages to a JMS queue
    Input:

    > java -jar JMSConnectTest.jar –c com.sun.jndi.fscontext.RefFSContextFactory –p file:/home/klee/JNDI-Directory –j Connection_Factory4 –d D2 –t 1 –n 2

    Output:

    Sending message: Thu Jul 12 10:15:41 PDT 2012 : 0 This is a test message from Informatica JMSConnect. Sending message: Thu Jul 12 10:15:41  PDT 2012 : 1 This is a test queue message from Informatica JMS Sender. Sent 2  message(s).

    Receive two messages from a JMS queue
    Input:

    > java -jar JMSConnectTest.jar –c com.sun.jndi.fscontext.RefFSContextFactory –p  file:/home/klee/JNDI-Directory –j Connection_Factory4 –d D2 –t 2 –n 2

    Output:

    Receiving message: NULL Receiving message: Wed Jun 20 16:07:30 PDT  2012 : 0 This is test message from Informatica JMSConnect. Received 2  message(s).

    Publish one message to a JMS Topic
    Input:

    > java -jar JMSConnectTest.jar –c com.sun.jndi.fscontext.RefFSContextFactory –p file:/home/klee/JNDI-Directory –j TCF –d TD –t 3

    Output:

    Sending message: Thu Jul 12 11:04:35 PDT 2012 : 0 This is a test  message from Informatica JMSConnect. Sent 1 message(s).

    Subscribe to a JMS Topic and receive one message
    Input:

    > java -jar JMSConnectTest.jar –c com.sun.jndi.fscontext.RefFSContextFactory –p file:/home/klee/JNDI-Directory –j TCF –d TD –t 4

    Output:

    Receiving message: Retained message Received 1 message(s).

     

    System Requirements

     

    1. JMS provider prerequisite jar files
    2. Informatica PowerExchange for JMS 8.x
    3. Informatica PowerExchange for JMS 9.x
    4. Informatica PowerExchange for JMS 10.x

     

    Supported Platforms

     

    • Linux
    • Solaris
    • AIX
    • HP-UX
    • Windows

     

    Known Limitations

    None