See my previous blog http://wso2.org/blog/sumedha/3157 [1].
Links:[1] http://wso2.org/blog/sumedha/3157