« Back

New Liferay Project: JRebel/Liferay Integration

General Blogs November 13, 2011 By Jan Gregor

Have you ever wondered about the number of deployments and server restarts you do per day ? For example, a single deployment takes 30 seconds and a server restart takes 1 minute (and these numbers are actually very optimistic).  For a typical scenario of 7 deployments and 2 server restarts per hour you need 60 re-deployments and 20 server  restarts per day. That adds up to almost 1 hour per day, 5 hours per week and 20 hours per month - that's almost 3 working days!.

So you spent 20 hours per month simply by doing nothing, or waiting. Ok, maybe not by doing nothing, there are some creative types who can spend their time being quite useful...

The fact that you end up spending 20 hours each month doing nothing would be definitely interesting to your boss :) But it's also frustrating for developers who cannot work as efficiently as they would like to. Especially in a portal enviroment, there are lots of deployments needed, both to the Application server and Liferay as well. These facts are very often a pain for new developers coming into the portal world.

No need to despair, though. We at mimacom believe that there is always a way to do things better. That's why we have decided to work with Liferay and Zeroturnaround (creators of JRebel) to start a new Liferay project to focus on solving this problem. The goal is to be able to develop with Liferay without the need of redeployments or server restarts.

JRebel/Liferay Integration Project

A few months ago, Neil Griffin posted a blog post about JRebel , which was the inspiration for me to dig into this tool a bit more and start using it. If you want to learn more about this tool, you will find all the important information at the JRebel project page. If you are developing Open Source Software, you can get your licence for free!

As Neil posted in his article, JRebel is works pretty good with Liferay when working on portlet plugins.  However, there are some issues when using JRebel with Liferay hooks and themes. That's why we have decided to create a Liferay project to develop a plugin for JRebel with the following goals:

  • Full support of Liferay theme framework (allow user to edit all static files in the IDE)
  • Full support of Liferay hook framework (allow any changes in any type of hook to be automatically reflected in the portal)
  • Full support of instance changes made in plugin descriptors (portlet.xml,liferay-hook.xml...)

Project page

This project will be the first of hopefully many community-driven projects, and will soon have its own project page on liferay.org. The project page will allow the community to have an entry point to find all relevant information about this project and how to get involved. Additionaly you will be also able to see the latest features of the plugin, report your bugs, and even contribute to the plugin. 

Community input

I hope that with this article, you can see how this tool can make your everyday life easier and save you a lot of time. At the moment we have identified some issues to tackle, but we know, that there are definitely more. We would be very happy if the Liferay community can provide us your experiences, problems, and any feedback related to using this tool. Your feedback and contributions will help us improve the plugin and move Liferay development to a new level, which will allow the whole community to develop application at a speed of light :) So until the project page is  ready, feel free to post your problems, or experiences just by posting comments on this blog.

So from now on, I am not accepting any complaints about the inefficiency of Liferay development and look forward to seeing all of you saving time in your developement tasks!

Threaded Replies Author Date
The integration is really simple. The basic... Steffen Schuler November 13, 2011 10:46 AM
Hi Steffen. As I mentioned in the post, the... Jan Gregor November 13, 2011 1:22 PM
good idea, you have to share something used Yousri BENDIABDALLAH November 14, 2011 9:26 AM
Can't wait to see this project deliver for our... James Falkner November 14, 2011 10:44 AM
Yousri: To set up a project using JRebel is... Jan Gregor November 14, 2011 11:03 AM
Wow! Awesome initiative! Thanks a lot, Jan & team Juan Fernández November 15, 2011 12:34 AM
Under IntelliJ, the only wierd thing you have... Fran Serrano Pons November 15, 2011 3:40 AM
Hi Fran. Actually the JSP hooks does not work... Jan Gregor November 15, 2011 3:48 AM
Thanks for the info Jan! Fran Serrano Pons November 16, 2011 3:09 AM
[...] If you have been following the news, you... Anonymous December 7, 2011 4:54 AM
[...] Neil Griffin’s summer blog post about... Anonymous January 3, 2012 7:15 AM
Sounds very interesting !!! Waiting for the... Tejas Kanani February 17, 2012 1:55 AM
Hi Tejas, The plugin is ready to use.. all the... Jan Gregor February 20, 2012 12:49 PM

The integration is really simple. The basic setup involves a parameter that needs to be set in setenv.sh (in case you have a tomcat app server) that points to the JRebel installation dir and a rebel.xml file within your project to tell JRebel, which sources to take care of - pretty simple : )

... and of course, you can finetune it - e.g. if you need to configure static sources etc.
Posted on 11/13/11 10:46 AM.
Hi Steffen. As I mentioned in the post, the basic integration is no problem. The reason, why we are creating this plugin is missing support for hook/theme frameworks and some other issues. You can use JRebel right now for standard portlet development.
Posted on 11/13/11 1:22 PM in reply to Steffen Schuler.
good idea, you have to share something used
Posted on 11/14/11 9:26 AM.
Can't wait to see this project deliver for our community!
Posted on 11/14/11 10:44 AM.
Yousri: To set up a project using JRebel is pretty easy, you can just follow the manual at Zeroturnaround web. Once the project page is ready I think we should put some short how-to there as well.
Posted on 11/14/11 11:03 AM.
Wow! Awesome initiative!
Thanks a lot, Jan & team
Posted on 11/15/11 12:34 AM.
Under IntelliJ, the only wierd thing you have to take care about is setting the environment property "CATALINA_BASE" to a blank value, so deployed Tomcat is able to be aware of the hot deploy folder ($LIFERAY_HOME/deploy). Otherwise when you redeploy your plugin through liferay:deploy maven goal, nothing will happen (only for Maven users)
I don't know if this applies also to Eclipse/Netbeans IDE as we do not use them.
Posted on 11/15/11 3:40 AM in reply to Juan Fernández.
Hi Fran. Actually the JSP hooks does not work at all with JRebel, because of the way, how the framework works. There are also some issues with other type of hooks, when the changes are sometimes not applied. The goal of this plugin also will be to have the possibility to make any change in plugin descriptor and reflect this change to portal without a need of re-deployment.
Posted on 11/15/11 3:48 AM in reply to Fran Serrano Pons.
Thanks for the info Jan!
Posted on 11/16/11 3:09 AM in reply to Jan Gregor.
[...] If you have been following the news, you may have noticed a blog post about the new project for Liferay community for improving JRebel user experience with Liferay Portal. The new release comes with a... [...] Read More
Posted on 12/7/11 4:54 AM.
[...] Neil Griffin’s summer blog post about eliminating redeploys during Liferay portlet development was a great introduction to using JRebel and Liferay together. In November 2011, after having a few... [...] Read More
Posted on 1/3/12 7:15 AM.
Sounds very interesting !!!
Waiting for the Plugins ...
Posted on 2/17/12 1:55 AM in reply to .
Hi Tejas,

The plugin is ready to use.. all the liferay functionality and plugin modules are now supported by the jrebel plugin !
Posted on 2/20/12 12:49 PM in reply to Tejas Kanani.