A Family Affair


I started a new new side project together with my family. Casas de Férias no Algarve is a holiday rentals website which can be found at www.casasdeferiasnoalgarve.com Here people can find unique and privately owned properties to rent in the south of Portugal.

I created this website using a WordPress installation with a custom theme and several plugins and hosted it at TSOHost.

I have learned a lot by using wordpress to build this website, not only is it quick but it also has many useful plugins like Yoast WordPress SEO Plugin  and Yoast Google Analytics for WordPress. I have also used WPML to create a multi-lingual website. It is not perfect but certainly a quick way to get your website running in different languages in no time. I’ve used a highly customisable wordpress template which is simple but looks great.

I had so much fun building this site, which reminded me how much I love coding! I encountered several challenges while building the site and I actually fixed a bug in WPML redirection module (in PHP), which made me a bit proud, after not coding for more than 2 years.

The logo below was commissioned by a designer at 99designs.com. It’s so easy to make a website these days and I love it!


When I started this blog back in 2006 I was a graduate starting my first job and I was super excited about learning Java and all sorts of related technologies. I have since then been in numerous roles as Developer, Team Lead, Scrum Master, Software Delivery Manager and even Product Manager.

I wrote many lines of code, created several projects on my free time, attended many conferences and courses, worked in companies in Holland, Portugal and England and had the pleasure of working with so many people of different origins from whom I learned so much. It’s been an amazing experience and having this blog allowed  to keep those memories!

I still have visits to the blog on a daily basis, perhaps from developers searching for answers about Java coding so thanks for everyone that visited, commented and found it useful over the years.

Thanks for my grandpa for giving me a Spectrum 128k and for my dad for showing me his brand new Windows 3.1 PC. This played a huge role on shaping my future and on my passion for engineering and problem solving.

It is unlikely that I will be writing any more posts about coding and engineering since my life has evolved and I found other interests over the years. I love learning new things which are not always technology related, although my heart will always belong there.

Handler Interceptors For Annotation Based Configuration in Spring

Here’s what you need to have in your *-servlet.xml file:

<context:annotation-config />
<context:component-scan base-package="com.travelfusion.tfweb.guide.controller" />

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
   <property name="interceptors">
      <ref bean="myInterceptor" />

<bean id="myInterceptor" class="com.company.MyInterceptor">
  <property name="openingTime"><value>9</value></property>
  <property name="closingTime"><value>18</value></property>

And your interceptor class something like:

public class MyInterceptor implements HandlerInterceptor {
   private int openingTime;
   private int closingTime;

   public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws    Exception {
      // TODO Auto-generated method stub

   public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) throws    Exception {
      // TODO Auto-generated method stub

   public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception {
        Calendar cal = Calendar.getInstance();
        int hour = cal.get(HOUR_OF_DAY);
        if (openingTime <= hour < closingTime) {
           return true;
        } else {
           return false;