Time Lapse of Sunset from Milpitas Hills

Untitled from Anand Rajasekar on Vimeo.

2 Comments » - Read More..>>

Tomcat Initializing Servlet Twice

A web application is configured using tomcat’s server.xml and the context.xml. There some configurations that cause web applications to initialize twice like

Duplicate definition of context in context.xml and server.xml
Bugs in tomcat launchers for eclipse that create duplicate context definitions
Duplicate definition of contexts when defining multiple hosts

In my case I had a proper definition of the [...]

No Comments » - Read More..>>

Three makes it perfect

Sometimes creating a collage of similar photographs adds a stunning effect. Here are three photographs of Aradhana stacking blocks.

1 Comment » - Read More..>>

Photographing Running Children

Capturing a sharp photograph of a running child can be quite a challenge. Canon has a focusing mode called AI Servo that makes focusing moving objects very easy. This mode uses the auto focus motor to continuously focus on the object in the center of the view finder.

This photograph was taken with my Digtal [...]

1 Comment » - Read More..>>

Java Serialization Versioning with Externalizable

Java Serialization is a easy way to persist the state of Java Objects. However if the structure of the class changes the serialized bytes is invalidated by the changes. This article suggest how one could implement serialization with Externalizable with support for versions.
Consider a simple java class

public class SimpleObject implements Serializable {

        [...]

1 Comment » - Read More..>>

Modifying Classpath at Runtime

A hackish way of modifying the classpath at runtime can be done in a way described at the java forums Modifying Classpath at Runtime
A cleaner approach is to configure your own classloader and set it as the threads context classloader

URL[] urls=new URL[2];

URLClassLoader classLoader=new URLClassLoader(urls);

Thread.currentThread().setContextClassLoader(classLoader);

This is extremely useful if your unit test cases have dependencies [...]

No Comments » - Read More..>>

InheritableThreadLocal and Tomcat

InheritableThreadLocal does not work with tomcat as tomcat thread pool does not clear the thread local contacts after a request has been executed. This results in no good way to share information information between the parent and the child threads that are created using thread local variables.
One way to solve this problem is to [...]

No Comments » - Read More..>>

நீயே யென் வாழ்கையின் ஆராதனை

நீ பார்த முதல் ஒளிநான் கேட்டேன் உன் முதல் ஒலி
அரிந்தேன்னே வாழ்கையின் அர்தம்வியந்தேன்னே வாழ்கையின் அதிசயம்சூவைத்தேனே வாழ்கையின் அருமைநீயே யென் வாழ்கையின் ஆராதனை

4 Comments » - Read More..>>