The road so far….

June 27, 2010

Enums are Not Singleton !!

Filed under: java — Tags: , — Rahul Sharma @ 9:57 pm

After going through  couple of  blogs on Enums and associated design patterns, I started testing Enums and their behaviour especially in relation to Singleton pattern.  So I implemented a simple Enum and started to test it.

public enum MyApplicationFactory {
   void operate() {
     System.out.println("Working On it!! ");

public class MyAppFactoryTests {
   public void testOne() {

This test went fine, so I added one more constant “ModuleTwo ” to Enum and that also went fine. But the problem came when I implemented a constructor in the Enum.  So now my Enum looks like this : (more…)

June 14, 2010

Web Services MEP with Axis2

Filed under: java — Tags: , — Rahul Sharma @ 10:27 pm

We had an application, that was based on the publisher-subscriber model. Then we thought of porting such an application to Web services. Taking that in mind I started looking for Axis2 and jaxws Web services stacks. I came across different MEP patterns that are supported by the two stacks. I found that such a model is possible in Axis2 using the Apache Savan project but that seems to be broken as I could not find the projects maven repository, examples etc.  Eventually we found out that none of the existing Web services stacks support such a MEP and we have to look into something called WS-Notification for the same,and started looking into the Apache Muse project.

But while looking for  such a model I found out Axis supports  more MEPs than jaxws. So here I will list of the MEPs that are supported by Axis2. (more…)

June 4, 2010

Testing Hadoop MapReduce Using Fitnesse

Filed under: java — Tags: , — Rahul Sharma @ 9:38 pm

Testing is an important aspect of TDD and we do it by deriving tests for every possible element. Testing components along with the framework, where they are deployed possess its own set of challenges and most of them are from the framework side like the environment in which the framework operates , how much control does it offer etc.

Unit testing Map-Reduce classes was easy part as they can be tested using Mock-Objects but testing using Fitnesse, where we would like to run the whole system on a bunch of Inputs and then retrieving outputs, was a whole different ball game. We had the following challenges in mind while trying to integrate Hadoop and Map-Reudce: (more…)

June 1, 2010

MapReduce and The Cloud

Filed under: java — Tags: , , — Rahul Sharma @ 8:50 pm

The other day I was discussing with one of my colleagues the spring-vmforce-GAE cloud platform, that is yet to be launched, and  the discussion led to MapReduce as a cloud platform. There seems to be an understanding about Hadoop MapReduce as some competitive Cloud platform. (more…)