Thursday, May 14, 2009

JavaRebel + m2eclipse = Sweet Spot

One of the pain-points while developing Java-based web-applications is the issue of the bouncing server. Every time you change a class file, your web application context needs a restart. While this is mildly annoying for small applications, it is simply unbearable for anything more substantial.

As far as I now the best and cheapest solution so far has been to use MyEclipse. It worked great and I rarely had to restart web contexts.

I always wondered why the standard IDEs (E.g. plain Eclipse WTP, IntelliJ ) never solved that re-deployment issue. Well, at least I have not been able to get this sufficiently working in plain Eclipse+WTP or IDEA IntelliJ.

Unfortunately, with the advent of Maven, MyEclipse started to loose come of its charm. For years, they were not able to provide an acceptable Maven integration (There was an entry on their forum for years demanding that feature) and on the other side, WTP started to become usable (I have not really tested the Maven integration introduced with MyEclipse 7 but I have read, that it is still not perfect). But one thing, that MyEclipse had nonetheless going for it, were its hot deployment capabilities.

Enter ZeroTurnaround's JavaRebel. Four weeks ago I started looking at JavaRebel and have been using it for the development of my OSS project since then. My verdict: It is awesome.

I use it in conjunction with the m2eclipse plugin and it simply works. ZeroTurnaround provides guides regarding the Eclipse and Maven integration (here and here) that are fairly straigtforward. It also comes with support for Spring and Struts2 directly.

The nice thing about JavaRebel is that it is agnostic to the used IDE as it simply hooks into the JVM as a Java agent. Therefore, you probably could also easily use it from the command line (in case you like to code using VI :-).

One drawback is the price which makes JavaRebel more expensive than MyEclipse. On the other hand, there is not much in MyEclipse that you cannot have in plain Eclipse/WTP using free plugins. Thus, ultimately it may boil down to personal preference but to me JavaRebel with plain Eclipse WTP (or IntelliJ for that matter) is the much nicer package. And if you have a project with an OSS license you can get JavaRebel for free, and don't have to buy MyEclipse.

Labels: ,

Friday, May 8, 2009

Vi on a fresh Ubuntu installation - issue

I am in the process of setting up Ubuntu 9.04 on my Linode instance. Looks like Vi was behaving screwy (Keys did not work as expected). Luckily there is Google and the following link helped.

I created a .vimrc file in my home directory:

vi ~/.vimrc

and added the following line to it:

set nocompatible

That worked for me.