Saturday, July 3, 2010

Tomcat, Struts, Tiles and Hibernate Migration

I had an old ‘home’ project that was based on the following technologies:

(1) Tomcat

(2) Hibernate

(3) MySQL

(4) Struts 1x

(5) Tiles 1x

I had developed this in 2004-2005 for a user-experience experiment I had designed.

I just decided to upgrade the technologies to :

(1) Geronimo

(2) OpenJPA

(3) MySQL

(4) Struts 2

(5) Tiles 2.2x

Why ? Mainly to experience what a migration path might be.

As I go through the effort – it turns out that there is no easy migration path. OpenJPA is vastly different from Hibernate. Struts 1x and Struts 2x have very little in common. It is a full rewrite. Tiles 2x has the most common features deprecated, and it too is a rewrite – given the jsp pages need to be updated. The latest version of Tiles is incompatible with the latest version of Struts (as of May 2010).




WARN  [TilesContainerFactory] DEPRECATION WARNING! You are using parameter-based initialization, that is no longer supported! Please see docs:

You’re better off using an older version of Tiles as long as you don’t care about Freemarker etc and are simply going to use JSPs on the view.

All in all, there is no migration it is a full rework/refactor/rewrite and is pretty significant and directly correlated to the size of the enterprise app. This information is good to have for those looking to ‘migrate’ legacy JEE apps.