Connect to a WebSphereJMS Provider

This topic describes how to configure the to connect to an IBM WebSphere MQ server as a JMS provider.
gateway91
This topic describes how to configure the
API Gateway
to connect to an IBM WebSphere MQ server as a JMS provider.
Prerequisites:
  • The WebSphere Application Server is installed
  • Access to a WebSphere admin console
  • Generated and downloaded keystore and trust store files
  • Access to the Policy Manager
  • Access to the following JAR files for MQSeries routing:
    com.ibm.ws.orb_8.5.0.jar
    com.ibm.ws.ejb.thinclient_8.5.0.jar
    com.ibm.ws.sib.client.thin.jms_8.5.0.jar
    endorsed_apis_8.5.0.jar
    mail-1.4.5.jar
Step 1: Set Up the Gateway for WebSphere
To set up the Gateway for WebSphere:
  1. Stop the
    API Gateway
    .
  2. Copy all files under “Prerequisites”
    except
    for
    endorsed_apis_8.5.0.jar
    to the following location on the Gateway:
    /opt/SecureSpan/Gateway/runtime/lib/ext
  3. Copy file mail-1.4.5.jar from:
    /opt/SecureSpan/Gateway/runtime/lib
    to:
    $ssgmachine//opt/SecureSpan/Gateway/runtime/lib/ext
  4. Create the following directory:
    /opt/SecureSpan/Gateway/runtime/lib/ext2
  5. Copy the file javax.ws.rs-api-2.0.jar from this directory on the Gateway:
    /opt/SecureSpan/Gateway/runtime/lib
    To the
    ext2
    directory:
    /opt/SecureSpan/Gateway/runtime/lib/ext2
  6. Open the following file for editing:
    /opt/SecureSpan/Gateway/node/default/etc/conf/node.propertie
    s
    Then add the following line (all one line):
    node.java.opts=-Djava.ext.dirs=/op/SecureSpan/JDK/jre/lib/ext:
    /opt/SecureSpan/Gateway/runtime/lib/ext2:/opt/SecureSpan/Gateway/runtime/lib/ext
  7. Create the following new directory on the Gateway:
    /opt/SecureSpan/Gateway/runtime/lib/endorsed
  8. Copy the file endorsed_apis_8.5.0.jar into the newly created directory.
  9. Restart the Gateway.
Step 2: Configure SSL on the Gateway
To configure SSL on the Gateway:
  1. Create the following directory:
    /misc
  2. Copy the keystore and truststore files (*.jks) from the IBMV85 server to the
    /misc
    directory on the Gateway:
  3. Copy the
    ssl.client.probs
    and
    sas.client.props
    configuration files from the WebSphere server to: /home, edit, and upload to the Gateway.
    <IBM WebSphere install directory>
    /AppServer/profiles/${profile}/properties
  4. Make the following changes to the file:
    user.root=${location of the keystore and trust store directory}
    com.ibm.ssl.protocol=SSL
    com.ibm.ssl.trustManager=SunX509
    com.ibm.ssl.keyManager=SunX509
    com.ibm.ssl.contextProvider=SunJSSE
    com.ibm.ssl.keyStoreType=JKS
    com.ibm.ssl.keyStoreProvider=SUN
    com.ibm.ssl.keyStore=${user.root}/etc/key.jks
    com.ibm.ssl.keyStorePassword=${The password for the key store}
    com.ibm.ssl.trustStoreType=JKS
    com.ibm.ssl.trustStoreProvider=SUN
    com.ibm.ssl.trustStore=${user.root}/etc/trust.jks
    com.ibm.ssl.trustStorePassword=${The password for the trust store}
    For example:
    user.root=/misc
    com.ibm.ssl.protocol=SSL
    com.ibm.ssl.trustManager=SunX509
    com.ibm.ssl.keyManager=SunX509
    com.ibm.ssl.contextProvider=SunJSSE
    com.ibm.ssl.keyStoreType=JKS
    com.ibm.ssl.keyStoreProvider=SUN
    com.ibm.ssl.keyStore=${user.root}/DummyClientKeyFile.jks
    com.ibm.ssl.keyStorePassword=WebAS
    com.ibm.ssl.trustStoreType=JKS
    com.ibm.ssl.trustStoreProvider=SUN
    com.ibm.ssl.trustStore=${user.root}/DummyClientTrustFile.jks
    com.ibm.ssl.trustStorePassword=WebAS
  5. Copy the
    ssl.client.props
    and
    sas.client.props
    (also from the directory in step 3) files to the following directory on the Gateway:
    /home
    Add the following system properties to the Gateway Java process. One way to do this is to append them to the
    system.properties
    file:
    java.ext.dirs=${Gateway install Directory}/runtime/lib/ext
    java.endorsed.dirs=${Gateway install Directory}/runtime/lib/endorsed
    com.ibm.SSL.ConfigURI=file:///${Directory for ssl client props}/ssl.client.props
    com.ibm.CORBA.ConfigURI=file:///${Directory for sas client props}/sas.client.props
  6. Open the following file on the Gateway for editing:
    /opt/SecureSpan/Gateway/node/default/etc/config/system.properties
  7. Add the system properties as shown in step 5, for example:
    java.ext.dirs=/opt/SecureSpan/Gateway/runtime/lib/ext
    java.endorsed.dirs=/opt/SecureSpan/Gateway/runtime/lib/endorsed
    com.ibm.SSL.ConfigURI=file:///home/ssl.client.props
    com.ibm.CORBA.ConfigURI=file:///home/sas.client.props
  8. Restart the Gateway.
Step 3: Register the JMS Destinations
This last step involves using the Policy Manager to register the JMS destinations.
To register a JMS destination:
  1. In the Policy Manager, run the Manage JMS Destinations task. .
  2. Click [
    Add
    ] to create a new JMS Destination.
  3. Complete the fields as follows:
    1. In the [Basics] tab:
      • Name:
        Enter a name for the new JMS destination.
      • Direction:
        Inbound
      • Provider Type:
        Generic JMS
    2. In the [JNDI] tab:
      • Initial Context Factory class name:
        Enter
        com.ibm.websphere.naming.WsnInitialContextFactory
      • JNDI URI:
        Enter the URI of the destination server.
      • Credentials are required to connect to JNDI:
        Set as appropriate.
    3. In the [Destination] tab:
      • Destination Type:
        Queue
      • Connection Factory Name:
        Enter a name that is used to create a connection with the JMS provider (for example, "jms/QueueConnectionFactory").
      • Destination Name:
        Enter the name of the queue to use in the MQ server (for example, "samplequeue1_out").
      • Credentials are required to connect to this destination:
        Set as appropriate.
  4. Click [
    Test Settings
    ] to validate your settings. The Gateway attempts to connect to the JMS destination and then displays the results.
  5. After a successful test, click [
    Save
    ] to register the JMS destination on the Gateway.
For detailed instructions on the JMS Destination fields, refer to JMS Destination Properties.