Professional Documents
Culture Documents
TAFJ-IBM MQ With WEBLOGIC Using SSL Connectivity
TAFJ-IBM MQ With WEBLOGIC Using SSL Connectivity
TAFJ-IBM MQ With WEBLOGIC Using SSL Connectivity
W EBLOGIC u si n g S SL
c o n n e c tivity
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Amendement History:
Revisio
Date Amended Name Description
n
1 20th October 2019 M. Siranjeevi Content Prepared
2 20th October 2019 Ram Content Reviewed
Page 2
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Copyri g h t
Copyright © Temenos Headquarters SA 2009-2019
All rights reserved.
This document contains proprietary information that is protected by copyright. No part of this document may
be reproduced, transmitted, or made available directly or indirectly to a third party without the express
written agreement of TEMENOS UK Limited. Receipt of this material directly TEMENOS UK Limited
constitutes its express permission to copy. Permission to use or copy this document expressly excludes
modifying it for any purpose, or using it to create a derivative therefrom.
Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland
Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. TAFJdev@temenos.com
Page 3
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Table of Contents
Copyright................................................................................................................................................ 3
Errata and Comments............................................................................................................................ 3
Creation of queues manager and queue................................................................................................5
Queue creation...................................................................................................................... 8
Binding the Queues.............................................................................................................................. 10
Creating Keystore and Truststore......................................................................................................... 12
Setup at Websphere MQ level.............................................................................................................. 14
Setup at Weblogic level........................................................................................................................ 17
Creating a Foreign JMS server............................................................................................................. 19
Creating Connection Factory................................................................................................................ 27
Page 4
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Creat i o n of qu e u e s ma n a g e r and qu e u e
Queu e man a g e r crea tio n
Start Websphere MQ manager and you will see the home page as given below,
Page 5
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Click "Next"
Make sure the option "Create listener configured for TCP / IP" is selected and define the
PORT Number as 1414 (If it’s already used you can define another one) and "Next"
Page 6
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Click "Next"
Page 7
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Que u e cre a t i o n
Creating of MQClearingQueue
Page 8
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Click "Finish"
Page 9
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
U
nder new folder C:\LocalArea\Dev\TAFJ\appserver\MQ\MQ-JNDI create a file
MyAdmin.Config with the following contents:
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file://C:/LocalArea/Dev/TAFJ/appserver/MQ/MQ-JNDI
SECURITY_AUTHENTICATION=none
Open a command prompt as Administrator and set the following CLASSPATH as shown
below
Page 10
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
C:\LocalArea\Dev\TAFJ\appserver\MQ\MQ-JNDI>set
MQ_JAVA_INSTALL_PATH="C:\Program Files\IBM\MQ\java"
C:\LocalArea\Dev\TAFJ\appserver\MQ\MQ-JNDI>set classpath=
%MQ_JAVA_INSTALL_PATH%\*;%classpath%
C:\LocalArea\Dev\TAFJ\appserver\MQ\MQ-JNDI>set path=%MQ_JAVA_INSTALL_PATH%;
%path%
C:\LocalArea\Dev\TAFJ\appserver\MQ\MQ-JNDI>"C:\Program
Files\IBM\MQ\java\bin\JMSAdmin.bat" -cfg MyAdmin.config
We should see a message like “Stopping Websphere MQ classes for Java(tm) Message
Service Administration” after we press Enter after the last line “end”.
After Successful, binding of Queues a file with the name .bindings will be created at
C:\LocalArea\Dev\TAFJ\appserver\MQ\MQ-JNDI.
Page 11
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Page 12
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
After executing the above command, you will get the details as specified in the image below.
Make sure to input the password 'temenos' which we given for creating the keystore.
After executing the above command, you will be asked for the password, Give the same
password "temenos" and you will get the details as specified in the image below,
After executing the preceding command, you will get the details as specified in the image
below
Page 13
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
After executing the preceding command, you will get the details as specified in the image
below,
Se t u p at Web s p h e r e MQ leve l
Right click IBM MQManage SSL certificates
Page 14
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Enter the password 'temenos', which we used to create keystore and check 'stash password
to a file’
Page 15
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
From personal Certificates, import the keystore (temntafj.jks) from the path where we have
generated
Page 16
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Now click View/Edit button and check the check box 'set the certificate as default'.
Se t u p at Webl o g i c lev el
Weblogic star t u p script s at setDo m ai n E n v.c m d
set JAVA_PROPERTIES=-Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME%
- Djavax.net.ssl.keyStore=C:\keystore\temntafj.jks
-Djavax.net.ssl.keyStorePassword=temenos
-Djavax.net.ssl.trustStore=C:\keystore\temntafjtrust.jks
-Djavax.net.ssl.trustStorePassword=temenos
-Doracle.net.ssl_cipher_suites=TLS_RSA_WITH_AES_128_CBC_SHA
-Dcom.ibm.mq.cfg.useIBMCipherMappings=false -Dcom.ibm.mq.cfg.preferTLS=true
set
DOM_HOME=C:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\
\lib
set CLASSPATH=%DOM_HOME%\\com.ibm.mq.jar;%DOM_HOME%\\com.ibm.mqjms.jar;
%DOM_HOME%\\com.ibm.mq.commonservices.jar;%DOM_HOME%\\com.ibm.mqetclient;
%DOM_HOME%\\fscontext.jar;%DOM_HOME%\\dhbcore.jar;%DOM_HOME
%\\com.ibm.mq.headers.jar;%DOM_HOME%\\com.ibm.mq.jmqi.jar;%CLASSPATH%
Copy the jars file from the MQ lib to the created domain server(<<Oracle_home>>
user_projects\domains\base_domain\lib) lib.
Page 17
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Map the generated generated keystore and trust keystore files in the Keystore tab.
From the left pane in the weblogic home EnvironmentserversAdminserver
Enter the Private Key Alias and respective credentials of the keystore.
From the left pane in the weblogic home EnvironmentserversAdminserver
Page 18
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Indicates whether the server can be reached through the default SSL listen port
Page 19
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Click Next
Click finish
Page 20
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Page 21
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Select “Foreign Server” radio button and click “Next” Foreign Server
Page 22
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
In this page we can see that the target server is selected already. Click Finish.
Open the newly created Foreign JMS server by clicking Services -> Messaging -> JMS
Modules -> SystemModule-T24 -> ForeignServer-MQ
Page 23
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
JNDI Connection URL: (This path must contain the .bindings file generated on the MQ
server) file://C:/LocalArea/Dev/TAFJ/appserver/MQ/MQ-JNDI
Page 24
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Creating Destinations
Name: OFSClearingQueue
Note that the Remote JNDI Name must match the name of the queue we created in
WebSphere MQ and click "OK".
Page 25
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
Repeat the same steps for Reply queue with the following naming
Name: OFSClearingReplyQueue
Local JNDI Name: jms/t24OFSClearingReplyQueue
Remote JNDI Name: MQClearingReplyQueue
Page 26
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
click "New"
Name: ConnectionFactory
Page 27
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
<message-driven>
<display-name>Transacted Listener MDB for OFS</display-name>
<ejb-name>MQTransactedMDB</ejb-name>
<ejb-class>com.temenos.tafj.mdb.TransactedMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<ejb-local-ref>
<ejb-ref-name>ejb/OFSProcessingBeanLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>com.temenos.tafj.sb.OFSProcessingBeanLocal</local>
<ejb-link>OFSProcessingBean</ejb-link>
</ejb-local-ref>
<resource-ref>
<description>Used to get connections to JMS for OFS queues</description>
<res-ref-name>jms/TAFJQueueConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<message-destination-ref>
<description>OFS queue</description>
<message-destination-ref-name>jms/ReplyQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
<message-destination-link>jms/OFSClearingReplyQueue</message-destination-link>
</message-destination-ref>
</message-driven>
<wls:weblogic-enterprise-bean>
<wls:ejb-name>MQTransactedMDB</wls:ejb-name>
<wls:message-driven-descriptor>
<wls:pool>
<wls:max-beans-in-free-pool>20</wls:max-beans-in-free-pool>
<wls:initial-beans-in-free-pool>4</wls:initial-beans-in-free-pool>
</wls:pool>
<wls:destination-jndi-name>jms/t24OFSClearingQueue</wls:destination-jndi-name>
<wls:connection-factory-jndi-name>jms/ConnectionFactoryMQ</wls:connection-factory-
jndi-name>
</wls:message-driven-descriptor>
Page 28
IB M M Q w i t h W EBLOGI C u s i n g S SL c o n n e c tivi ty
<wls:resource-description>
<wls:res-ref-name>jms/TAFJQueueConnectionFactory</wls:res-ref-name>
<wls:jndi-name>jms/ConnectionFactoryMQ</wls:jndi-name>
</wls:resource-description>
<!-- MDB scoped work manager to run more than 16 agents -->
<wls:dispatch-policy>OFSWorkManager</wls:dispatch-policy>
</wls:weblogic-enterprise-bean>
<wls:message-destination-descriptor>
<wls:message-destination-name> </wls:message-destination-name>
jms/OFSClearingReplyQueue
<wls:destination-jndi-name> </wls:destination-jndi-name>
jms/t24OFSClearingReplyQueue
</wls:message-destination-descriptor>
Page 29