This section describes how to modify the above example to use SSL communications between the TIBCO Enterprise Message Service server, JBoss, and the client program. This section assumes you have already set up and run the example detailed in the previous sections.
Add the TIBCO tibcrypt.jar
file to the CLASSPATH
of the JBoss server by modifying the file %JBOSS_CONF%\jboss-service.xml
as described below. Substitute an appropriate JAR file CLASSPATH
for your installation.
Add the following line under the <server>
element in %JBOSS_CONF%\jboss-service.xml
:
tibemsd
in the working directory C:\TIBCO\ems\bin
as follows:tibemsd -config tibemsdssl.confWhen
17:09:03 Secure Socket Layer is enabled, using OpenSSL 0.9.7c. 17:09:03 Accepting connections on tcp://localhost:7222. 17:09:03 Accepting connections on ssl://localhost:7243. 17:09:03 Server is active.tibemsd
starts you should see messages like the following in the console window, confirming SSL is enabled:
tibemsadmin
(administration tool) and enter the following commands.
First, create a new XAQueueConnectionFactory
that establishes SSL connections:
There are two aspects to SSL communications between JBoss and the TIBCO EMS server. The first is for messaging between the JBoss and TIBCO servers to occur over SSL. The second is for JNDI lookups from JBoss to the TIBCO JNDI provider to occur over SSL. The following two sections separately describe the required steps for each.
%JBOSS_DEPLOY%\jms\jms-ds.xml
in the previous section (which specifies the QueueFactoryRef
attribute of the JMS ProviderLoader
) to be the be the new connection factory you just created (which establishes SSL connections):%JBOSS_DEPLOY%\jms\jms-ds.xml
in the previous section so it creates the JNDI LinkRef ToName
to the new SSL connection factorynamely SSLXAQueueConnectionFactory
(which you created above):%JBOSS_CONF%\jndi.properties
, add the following lines:com.tibco.tibjms.naming.security_protocol=ssl com.tibco.tibjms.naming.ssl_enable_verify_host=falseThese properties specify the SSL protocol for JNDI lookups, and disable host verification.
JMSProviderLoader
mbean in %JBOSS_DEPLOY%\jms\jms-ds.xml
:<attribute name="ProviderUrl"> tibjmsnaming://localhost:7243</attribute>The new line creates an additional attribute
ProviderUrl
, that explicitly states the JNDI provider URL (rather than using the default built into the TIBCO Enterprise Message Service JBoss adapter class) with a port number of 7243 for SSL. Note that attribute names are case sensitive and must be entered exactly as shown above.
%JBOSS_DEPLOY%\jms\jms-ds.xml
to explicitly specify the SSL port of 7243 in the JNDI LinkRef ToName
:standardjboss.xml
where you specified the TIBCO Enterprise Message Service JNDI name of the DLQ to explicitly specify the SSL port of 7243:You should see the same messages in the JBoss console during startup that you saw in the previous section.
The following JAR files, distributed with TIBCO Enterprise Message Service, must be added to the CLASSPATH
of the client program, in the same manner that you added the non-SSL jar files to the CLASSPATH
in the previous example:
The following changes must be made to the file %JBOSS_CLIENT%\jndi.properties
that you modified in the previous section for the client:
Modify the client program (SendRecvClient
) to look up SSLXAQueueConnectionFactory
instead of QueueConnectionFactory
. Rebuild the program.
Run the client program as you did in the previous section. You should see the same output.
To prove that SSL communications are occurring, stop the EMS server, then restart it without SSL:
Then stop JBoss, then restart it. You should see the following exception in the JBoss console:
If you now run the test program again, you should see that it throws the same exception. This shows that when the TIBCO Enterprise Message Service server was set up to accept SSL connections, both clients successfully connected and communicated using SSL.
Alternatively, you could start the TIBCO Enterprise Message Service server from a command prompt window and turn SSL debug tracing on, as follows:
Then when you restart JBoss and re-run the client program, you will see SSL debugging output on the tibemsd
console window.
TIBCO Enterprise Message Service™ Application Integration Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |