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.jarcom.ibm.ws.ejb.thinclient_8.5.0.jarcom.ibm.ws.sib.client.thin.jms_8.5.0.jarendorsed_apis_8.5.0.jarmail-1.4.5.jar
Step 1: Set Up the Gateway for WebSphere
To set up the Gateway for WebSphere:
- Stop theAPI Gateway.
- Copy all files under “Prerequisites”exceptforendorsed_apis_8.5.0.jarto the following location on the Gateway:/opt/SecureSpan/Gateway/runtime/lib/ext
- Copy file mail-1.4.5.jar from:/opt/SecureSpan/Gateway/runtime/libto:$ssgmachine//opt/SecureSpan/Gateway/runtime/lib/ext
- Create the following directory:/opt/SecureSpan/Gateway/runtime/lib/ext2
- Copy the file javax.ws.rs-api-2.0.jar from this directory on the Gateway:/opt/SecureSpan/Gateway/runtime/libTo theext2directory:/opt/SecureSpan/Gateway/runtime/lib/ext2
- Open the following file for editing:/opt/SecureSpan/Gateway/node/default/etc/conf/node.propertiesThen 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
- Create the following new directory on the Gateway:/opt/SecureSpan/Gateway/runtime/lib/endorsed
- Copy the file endorsed_apis_8.5.0.jar into the newly created directory.
- Restart the Gateway.
Step 2: Configure SSL on the Gateway
To configure SSL on the Gateway:
- Create the following directory:/misc
- Copy the keystore and truststore files (*.jks) from the IBMV85 server to the/miscdirectory on the Gateway:
- Copy thessl.client.probsandsas.client.propsconfiguration files from the WebSphere server to: /home, edit, and upload to the Gateway.<IBM WebSphere install directory>/AppServer/profiles/${profile}/properties
- Make the following changes to the file:user.root=${location of the keystore and trust store directory}com.ibm.ssl.protocol=SSLcom.ibm.ssl.trustManager=SunX509com.ibm.ssl.keyManager=SunX509com.ibm.ssl.contextProvider=SunJSSEcom.ibm.ssl.keyStoreType=JKScom.ibm.ssl.keyStoreProvider=SUNcom.ibm.ssl.keyStore=${user.root}/etc/key.jkscom.ibm.ssl.keyStorePassword=${The password for the key store}com.ibm.ssl.trustStoreType=JKScom.ibm.ssl.trustStoreProvider=SUNcom.ibm.ssl.trustStore=${user.root}/etc/trust.jkscom.ibm.ssl.trustStorePassword=${The password for the trust store}For example:user.root=/misccom.ibm.ssl.protocol=SSLcom.ibm.ssl.trustManager=SunX509com.ibm.ssl.keyManager=SunX509com.ibm.ssl.contextProvider=SunJSSEcom.ibm.ssl.keyStoreType=JKScom.ibm.ssl.keyStoreProvider=SUNcom.ibm.ssl.keyStore=${user.root}/DummyClientKeyFile.jkscom.ibm.ssl.keyStorePassword=WebAScom.ibm.ssl.trustStoreType=JKScom.ibm.ssl.trustStoreProvider=SUNcom.ibm.ssl.trustStore=${user.root}/DummyClientTrustFile.jkscom.ibm.ssl.trustStorePassword=WebAS
- Copy thessl.client.propsandsas.client.props(also from the directory in step 3) files to the following directory on the Gateway:/homeAdd the following system properties to the Gateway Java process. One way to do this is to append them to thesystem.propertiesfile:java.ext.dirs=${Gateway install Directory}/runtime/lib/extjava.endorsed.dirs=${Gateway install Directory}/runtime/lib/endorsedcom.ibm.SSL.ConfigURI=file:///${Directory for ssl client props}/ssl.client.propscom.ibm.CORBA.ConfigURI=file:///${Directory for sas client props}/sas.client.props
- Open the following file on the Gateway for editing:/opt/SecureSpan/Gateway/node/default/etc/config/system.properties
- Add the system properties as shown in step 5, for example:java.ext.dirs=/opt/SecureSpan/Gateway/runtime/lib/extjava.endorsed.dirs=/opt/SecureSpan/Gateway/runtime/lib/endorsedcom.ibm.SSL.ConfigURI=file:///home/ssl.client.propscom.ibm.CORBA.ConfigURI=file:///home/sas.client.props
- 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:
- In the Policy Manager, run the Manage JMS Destinations task. .
- Click [Add] to create a new JMS Destination.
- Complete the fields as follows:
- In the [Basics] tab:
- Name:Enter a name for the new JMS destination.
- Direction:Inbound
- Provider Type:Generic JMS
- In the [JNDI] tab:
- Initial Context Factory class name:Entercom.ibm.websphere.naming.WsnInitialContextFactory
- JNDI URI:Enter the URI of the destination server.
- Credentials are required to connect to JNDI:Set as appropriate.
- 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.
- Click [Test Settings] to validate your settings. The Gateway attempts to connect to the JMS destination and then displays the results.
- 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.