This section describes how to modify the above samples to use SSL communications between the TIBCO Enterprise Message Service server and WebSphere application server and client container. This section assumes you have already set up and run the samples over unencrypted connections detailed in the previous sections.In C:\tibco\EMS\bin\tibemsd.conf, add the following lines:These lines explicitly set the tcp and ssl listen ports and specify the three required server-side SSL parameters: identity, private key, and password.Save the file, stop and restart the TIBCO Enterprise Message Service server. When it restarts you should see messages like the following in the console window confirming SSL is enabled:TIBCO Enterprise Message Service is pre-configured with a sample SSL queue and topic connection factory. This step will create new JNDI names for the sample connection factories that are then be used throughout the rest of this section.
1. Verify that the SSL connection factories exist by starting the tibemsadmin tool and entering the command show factories. The names SSLQueueConnectionFactory and SSLTopicConnectionFactory should be among the names displayed.
2. Create new JNDI names for the existing SSL connection factories by entering the following commands:Edit the jndi.properties file created in Configure WebSphere for the TIBCO Enterprise Message Service JNDI Provider and add the following lines:These properties specify that the "SSL" protocol should be used for JNDI lookups, and that host verification is turned off (the JMS client will trust any host).
Configure SSL Communications Between the Application Server and the TIBCO Enterprise Message Service ServerThis procedure adds the additional jar files required for SSL to the CLASSPATH. It also modifies the external provider URL and the external JNDI name properties of the TIBCO JMS provider within the application server.This causes the application server to connect to the SSL port on the TIBCO Enterprise Message Service server for JNDI lookups of administered objects. Additionally, the connection factory external JNDI names are modified to specify SSL connection factories (connection factories that create SSL-based connections).
1. From the WebSphere Administrative Console, expand Resources > Generic JMS Providers and choose TIBCO in the content pane.
2. Add the following line to the Classpath property value:
3.
4. Click the Apply button.
5.
6. Choose TIBCO Connection Factory.
7. For the External JNDI Name property value, add port 7243 after the host specification and change the name of the factory that is looked up to sample.SSLQCF.
8. Click the OK button.
9. Repeat the above steps for TIBCO Connection Factory1, changing tibjmsnaming://localhost/sample.TCF to tibjmsnaming://localhost:7243/sample.SSLTCF.
10. Navigate to Generic JMS Providers > TIBCO.
11. Choose JMS Destinations.
12.
13. Configure SSL Communications between the Point-to-Point Sample MDB and the TIBCO Enterprise Message Service ServerThis procedure modifies the resource reference and the resource environment references of the point-to-point sample MDB. This causes the sample point-to-point MDB to connect to the SSL port on the TIBCO Enterprise Message Service server for JNDI lookups of administered objects.Additionally, the connection factory external JNDI name is modified to specify a SSL connection factory (connection factory that creates SSL-based connections).
2. Open the MDBSamples.ear file located in the <install_root>/AppServer/samples/lib/MessageDrivenBeans directory.
3.
4.
5. Click the Bindings tab.
6. Change the value of JNDI Name from tibjmsnaming://localhost/sample.QCF to tibjmsnaming://localhost:7243/sample.SSLQCF.
7. Click the Apply button.
8. In the navigation pane, choose Resource Environment References. The name JMS/SampleOutputQueue should appear in the content pane.
9. Click the Bindings tab.
10. Change the value of JNDI Name from tibjmsnaming://localhost/sample.Q2 to tibjmsnaming://localhost:7243/sample.Q2.
11. Click the Apply button.
12. Choose File > Save from the menu.Configure SSL Communications between the Application Client and the TIBCO Enterprise Message Service Server
1. In the Application Assembly Tool, expand MDBSamples > Application Clients > PSSampleClient > Resource Environment References.
2.
3. Change the value of the JNDI name from tibjmsnaming://localhost/sample.news to tibjmsnaming://localhost:7243/sample.news.
4. Click the Apply button.
6.
7.
8. Change the value of the JNDI name from tibjmsnaming://localhost/sample.Q1 to tibjmsnaming://localhost:7243/sample.Q1.
9. Click the Apply button.
11. Save the MDBSamples.ear file (File > Save).
13. Start the WebSphere Application Client Resource Configuration Tool from a console window by entering:
14. Open the MDBSamples.ear file located in the <install_root>/AppServer/samples/lib/MessageDrivenBeans directory.
15. Expand PSSampleClient.jar > JMS Providers.
16.
17. Append the following line to the end of the value for the Class Path property:
18. Change the value of the Provider URL property from tibjmsnaming://localhost:7222 to tibjmsnaming://localhost:7243.
19. Click the OK button.
20.
21.
22. Change the value of the External JNDI Name property from tibjmsnaming://localhost/sample.TCF to tibjmsnaming://localhost:7243/sample.SSLTCF.
23. Click the OK button.
24. Repeat the above steps for PtoPSampleClient.jar, again appending to the Class Path:
25. Save the EAR file by choosing File > Save from the menu.
26. Close the MDBSamples.ear file.Follow the same procedure to update the deployed application on the server as in the previous section.
Copyright © TIBCO Software Inc. All Rights Reserved.