Skip to main content

Posts

Showing posts from February, 2016

Musings on SSL troubles in websphere container

SSL is a standard technology for connecting systems in a client server architecture. Setting up our Java based applications to use SSL requires setting up keystores and truststores. Java provides a key and certificate management utility called keytool that can be used to setup required key and trust-stores for secure communication. With websphere, things get a little different. Websphere provides a tool called ikeyman that is used to manage key and trust databases. The JEE container loads the SocketFactory, that an application can refer using SSLSocketFactory.getDefault(), with the certificates from the key and trust databases. The default instance of SSLSocketFactory does not load certificates that might be present in the JRE. This brings us to a major consideration while working with SSL on websphere. Work only with default SSLSocketFactory . APIs not using default SSLSocketFactory will not work, unless we write code that handles the certificates and sets up SSLSocketFac...

Using JNDI managed JMS objects with Apache CAMEL

Apache CAMEL uses Spring JMS to work with JMS Queues or Topics. Evidently, we will need Spring to configure and use JMS capabilities provided by CAMEL. Details about how to implement JMS based routes using Apache CAMEL can be found in the CAMEL documentation. However, the documentation leaves a lot to be figured out. In a typical Java EE container, it is usually a good idea to abstract the underlying JMS resources by using JNDI. We can use the below configuration to achieve that. This configuration is tested in Websphere environment, but should work in any JEE container. Create a JMS queue connection factory in the JNDI registry. CAMEL configuration will be able to use only one queue connection factory, even if we have more than one. Create one or more JMS queue or topics, in the JNDI registry, as required. The above two steps are related to generic JNDI configuration for JMS resources. Now we come to the setup required for making these JMS resources work with CAMEL rout...