This section describes how to modify the above example to use SSL communications between the TIBCO Enterprise Message Service server, the WebLogic Server 10.0, and the client program. This section assumes you have already set up and run the example detailed in the previous sections.
In the directory where WebLogicHome\samples\domains\wl_server, modify the
CLASSPATH environment variable in
setExamplesEnv.cmd (the examples setup script) and
startExamplesServer.cmd (the start script).
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 for identity, private key, and password.
Save the file, then stop and restart the TIBCO Enterprise Message Service server. When the server restarts, you should see messages like the following in the console window confirming SSL is enabled:
After competing the modifications, the foreignJmsProvider tag should look like this:
Create a new command prompt window and run the examples setup script, setExamplesEnv.cmd, so that the SSL related changes to the environment are picked up.
You should see the same messages sent by the client and received by the MDB in the WebLogic server window. You may notice that this example runs slightly slower than the non-SSL version. This is because of the SSL handshake that occurs before the messages are displayed.
To show that SSL communications are in fact occurring, you could remove the SSL settings you added to
tibemsd.conf. Then restart the TIBCO Enterprise Message Service server and the WebLogic Server. If you check the WebLogic Server logs, you should see exceptions thrown indicating that it could not connect. If you now run the test program again, you should see that it throws an exception indicating that it could not connect to the server using the SSL protocol. Alternatively (or additionally), you could start the TIBCO Enterprise Message Service server from a command prompt window and turn SSL debug tracing on, as follows: