Skip to main content

Posts

Showing posts from 2016

Nuances of Spatial data and operations Apache SOLR

SOLR is a scalable, distributed and powerful search and indexing solution. SOLR supports indexing spatial data and provides fast search capabilities on spatial data. Unlike conventional spatial data solutions like PostGIS, indexing spatial data in SOLR provides high speed search using bounding box and range queries, commonly used in spatial data exploration and processing. Indexing points and running bounding box queries is covered extensively in Apache SOLR documentation . We will discuss some specific use cases here, described but not explained in the documentation. 1. Indexing Fences in SOLR : SOLR provides a convenient and powerful type, location_rpt which is an implementation of  solr.SpatialRecursivePrefixTreeFieldType.  location_rpt indexes POINT data, consisting of latitude and longitude. Points are sufficient to index locations that need to be monitored, and that can be done by using bbox or geofile queries as in the documentation.  A typical use case in g...

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...