Blog

How to install and use JRebel (formerly JavaRebel) in GlassFish with Eclipse IDE

In the recently published Java EE Container Restart & Redeploy Report, the GlassFish v2 application container was the best of the fully fledged Java EE containers in the terms of time spent redeploying. That’s the good news. The not so good news is that on average respondents report spending 14% of their coding time waiting for server redeploys/restarts. That’s just over 170 hours annually, per developer – approximately 4.3 full weeks of development time. JRebel eliminates the need to redeploy in about 80% of redeploy situations – and it’s easy to get started. This tutorial explains how to install and use it step-by-step.

Here we assume that you are using Eclipse 3.x with GlassFish v2. Most of the steps will be applicable to other versions as well, but it may look different from the screenshots included.

NOTE: Although GlassFish is tightly integrated with NetBeans, the JRebel support for that IDE is in Beta at the moment – for now, we recommend using Eclipse or IntelliJ IDEA instead. We’ll make sure to announce when better NetBeans support is available (it’s coming soon).

First, take a quick look at how coding looks when using JRebel (formerly JavaRebel).

Contents:

STEP 1: Install JRebel

The latest stable version of JRebel can be downloaded here. Unpack it to a directory of your choice.

2009-07-03_124429

STEP 2: Installing JRebel Eclipse IDE plugin

The JRebel Eclipse IDE plugin was introduced with JRebel 2.0 and makes configuring and using JRebel considerably easier. You can install the plugin by going to Help » Software updates » Available software » Add site and use the http://www.zeroturnaround.com/update-site/ URL as the update site.

2009-07-15_142449

STEP 3: Make a rebel.xml for your application

In order to do it’s magic, JRebel needs to know where your classes and resources are. We’ll use a rebel.xml configuration file to tell it. This is mandatory when you deploy your app as a WAR/EAR. You’ll need to have one rebel.xml file per module. This includes both web and EJB modules. The rebel.xml configuration file should be placed in your WEB-INF/classes directory in the case of a web module and in the jar root in the case of an ejb module. Put it in the root of a source or resource folder in your project (the same place where the .properties files are).

If you use Maven you can use the JRebel Maven plugin that will generate the rebel.xml in accordance with the module pom.xml as described in the Maven Plugin configuration manual.

In 99% of cases, people tend to use one module per project. In these cases, the JRebel Eclipse IDE plugin can generate the rebel.xml file for you, on a per project basis. If your project is one of the exceptions, edit the file manually as described in the Installation manual, otherwise generate the rebel.xml like this:

Click on your project and pick Generate rebel.xml

2009-07-15_143501

STEP 4: Configuring the Eclipse WTP IDE

You may skip this step if you run GlassFish outside of the Eclipse IDE.

Open the Servers View and double click the GlassFish v2 that your application is deployed to (if you don’t see the Servers View go to Window » Show View » Servers).

2009-07-15_140106

Open Publishing and choose Never publish automatically.

2009-07-15_135824

It may seem wrong to disable automatic publishing, but as JRebel will take care of updates from now on it will just slow you down.

STEP 5: Configuring Eclipse IDE

Go to Window » Preferences and from there to Java » Debug » Step Filtering. Check Use Step Filters and Filter synthetic methods and Step through filters. Now check all the default filters and use the Add Filter button to add com.zeroturnaround.* and org.zeroturnaround.*.

2009-07-03_143321

Now go to Project » Build automatically and make sure it is checked.

2009-07-03_144612

STEP 6: Success!

To check that the installation was successful access a page that uses a class, change that class in the IDE, press Save, access the page again and look for the following message in the console:

2009-07-15_142301

Now that you’re up and running, it’s time to enjoy coding without the need to redeploy. If you have any specific questions JRebel, the Forum is the best place to ask, so that other people get to hear the answer as well. Otherwise, you can contact us at support@zeroturnaround.com.

If you like what you see, please give us a quick mention on your blog or twitter (you can even follow us here).

Have a great day!

Find out more:

How to install and use JRebel in WebLogic with Eclipse IDE

In a recently conducted survey (with 1100+ respondents),  WebLogic users estimated spending approximately 21% of all their coding time on the redeployment process.  To extrapolate a bit, that’s ~13 minutes per hour of coding, adding up to ~256 hours or 6.4 full work weeks annually.  JRebel reduces this time by 80%, so it’s worth taking a few minutes to try it out.  In this tutorial we explain how to install and use it step-by-step.

First, take a quick look at how coding looks when using JRebel (formerly JavaRebel).

This tutorial assumes that you are using Eclipse 3.x (with Oracle Enterprise Pack for Eclipse installed) with WebLogic 9.x or later. Most of the steps will be applicable to other versions as well, but it may look different from the screenshots included.

Contents:

STEP 1: Install JRebel

The latest stable version of JRebel can be downloaded here. Unpack it to a directory of your choice.

2009-07-03_124429

STEP 2: Installing JRebel Eclipse IDE plugin

The JRebel Eclipse IDE plugin was introduced with JRebel 2.0 and makes configuring and using JRebel considerably easier. You can install the plugin by going to Help » Software updates » Available software » Add site and use the http://www.zeroturnaround.com/update-site/ URL as the update site.

2009-07-15_142449

STEP 3: Make a rebel.xml for your application

In order to do it’s magic, JRebel needs to know where your classes and resources are. We’ll use a rebel.xml configuration file to tell it. This is mandatory when you deploy your app as a WAR/EAR. You’ll need to have one rebel.xml file per module. This includes both web and EJB modules. The rebel.xml configuration file should be placed in your WEB-INF/classes directory in the case of a web module and in the jar root in the case of an ejb module. Put it in the root of a source or resource folder in your project (the same place where the .properties files are).

If you use Maven you can use the JRebel Maven plugin that will generate the rebel.xml in accordance with the module pom.xml as described in the Maven Plugin configuration manual.

In 99% of cases, people tend to use one module per project. In these cases, the JRebel Eclipse IDE plugin can generate the rebel.xml file for you, on a per project basis. If your project is one of the exceptions, edit the file manually as described in the Installation manual, otherwise generate the rebel.xml like this:

Click on your project and pick Generate rebel.xml

2009-07-15_143501

STEP 4: Configuring the Eclipse WTP IDE

You may skip this step if you run Weblogic outside of the Eclipse IDE.

Open the Servers View and double click the BEA WebLogic Server that your application is deployed to (if you don’t see the Servers View go to Window » Show View » Servers).

Eclipse Weblogic Server

Open Publishing and choose Never publish automatically.

2009-07-15_144654

It may seem wrong to disable automatic publishing, but as JRebel will take care of updates from now on, it would just slow you down.

Open JRebel Integration and check Enable JRebel agent.

2009-07-15_145028

NB! With the current version of the Eclipse JRebel plugin checking the checkbox does NOT WORK. See the workaround in the next step.

STEP 4a: Configuring the Eclipse WTP IDE workaround

Until we update our JRebel Eclipse plugin you have to manually enable JRebel for the Weblogic Server. You would need to manually edit the startup script of the server. Luckily it is quite easy and the startup script can be opened for editing from the server view from the last step.

Eclipse Weblogic edit server startup-script

A text file will open. You will need to copy the following line as the first line of the file

set JAVA_OPTIONS=-noverify -javaagent:C:\javarebel.jar %JAVA_OPTIONS%

set JAVA_OPTIONS=-noverify -javaagent:C:\javarebel.jar %JAVA_OPTIONS%

Make sure to change the C:\javarebel.jar to the correct location.

STEP 5: Configuring Eclipse IDE

Go to Window » Preferences and from there to Java » Debug » Step Filtering. Check Use Step Filters and Filter synthetic methodsand Step through filters. Now check all the default filters and use the Add Filter button to add com.zeroturnaround.* andorg.zeroturnaround.*.

2009-07-03_143321

Now go to Project » Build automatically and make sure it is checked.

2009-07-03_144612

STEP 6: Success!

To check that the installation was successful access a page that uses a class, change that class in the IDE, press Save, access the page again and look for the following message in the console:

Eclipse Weblogic Success

Now that you’re up and running, it’s time to enjoy coding without the need to redeploy. If you have any specific questions JRebel, the Forum is the best place to ask, so that other people get to hear the answer as well. Otherwise, you can contact us at support@zeroturnaround.com.

If you like what you see, please give us a quick mention on your blog or twitter (you can even follow us here).

Have a great day!

Find out more:

The IBM WebSphere application container features one of the longest startup and redeploy times in J2EE development. In a survey we conducted (with 1100+ developer-respondents), WebSphere users estimated spending approximately 23% of their coding time (approximately 276 hours per year — or 6.9 full, 40-hour workweeks) waiting for applications to redeploy. JRebel eliminates 80% of redeploy situations, and it’s easy to get started. In the embedded video you can take a quick look at how coding looks when using JRebel (formerly JavaRebel).

This guide assumes that you are using Eclipse 3.x or Rational Application Developer 7.x with WebSphere 6.x or later. Most of the steps will be applicable to other versions as well, but it may look different from the screenshots included.

Contents:

STEP 1: Install JRebel

The latest stable version of JRebel can be downloaded here. Unpack it to a directory of your choice.

2009-07-03_124429

It is useful to define an environment variable called REBEL_HOME pointing to the directory you choose. In Windows you can do this by going to Control Panel » System » Advanced » Environment Variables » System Variable » New.

2009-07-03_134354

Now navigate to the directory where Java is bundled with IBM WebSphere. If you have a standalone installation it’s %IBM_HOME%\WebSphere\AppServer\java\bin. If you have it installed as part of RAD7 it should be %IBM_HOME%\SDP\runtimes\base_v61\java\bin. Run the following line in the console:

java -jar %REBEL_HOME%\jrebel.jar

2009-07-03_140819

STEP 2: Installing JRebel Eclipse/RAD IDE plugin

The JRebel Eclipse IDE plugin was introduced with JRebel 2.0 and makes configuring and using JRebel considerably easier. You can install the plugin by going to Help » Software updates » Available software » Add site and use the http://www.zeroturnaround.com/update-site/ URL as the update site.

2009-07-03_130819

STEP 3: Make a rebel.xml for your application

In order to do it’s magic, JRebel needs to know where your classes and resources are. We’ll use a rebel.xml configuration file to tell it. This is mandatory when you deploy your app as a WAR/EAR. You’ll need to have one rebel.xml file per module. This includes both web and EJB modules. The rebel.xml configuration file should be placed in your WEB-INF/classes directory in the case of a web module and in the jar root in the case of an ejb module. Put it in the root of a source or resource folder in your project (the same place where the .properties files are).

If you use Maven you can use the JRebel Maven plugin that will generate the rebel.xml in accordance with the module pom.xml as described in the Maven Plugin configuration manual.

In 99% of cases, people tend to use one module per project. In these cases, the JRebel Eclipse IDE plugin can generate the rebel.xml file for you, on a per project basis. If your project is one of the exceptions, edit the file manually as described in the Installation manual, otherwise generate the rebel.xml like this:

Click on your project and pick Generate rebel.xml

2009-07-03_125934

Done.

Repeat this for all projects that you’d like to update with JRebel.

If you’d like to use one rebel.xml for your whole team, start with the generated rebel.xml, then replace the absolute paths to your workspace with a system property. JRebel will expand expressions like “${myProject.root}” in rebel.xml to a system property that you can pass to the application container as -DmyProject.root=c:/myWorkspace/myProject. This allows to you to use a single configuration for everyone and then customize it when starting the server.

STEP 4: Configuring IBM Rational Application Developer

You may skip this step if you use the Eclipse IDE or run IBM WebSphere outside the RAD IDE.

Open the Servers View and double click the WebSphere Application Server that your application is deployed to (if you don’t see the Servers View go to Window » Show View » Servers).

2009-07-03_131413

Open Publishing and choose Never publish automatically.

2009-07-03_131724

Open Publishing settings for WebSphere Application Server and choose Run server with resources on server.

It may seem wrong to disable automatic publishing, but as JRebel will take care of updates from now on it would just slow you down.

STEP 5: Configuring Eclipse/RAD IDE

Go to Window » Preferences and from there to Java » Debug » Step Filtering. Check Use Step Filters and Filter synthetic methods and Step through filters. Now check all the default filters and use the Add Filter button to add com.zeroturnaround.* and org.zeroturnaround.*.

2009-07-03_143321

Now go to Project » Build Automatically and make sure it is checked.

2009-07-03_144612

STEP 6: Success!

To check that the installation was successful access a page that uses a class, change that class in the IDE, press Save, access the page again and look for the following message in the console:

2009-07-03_142228

Now that you’re up and running, it’s time to enjoy coding without the need to redeploy. If you have any specific questions JRebel, the Forum is the best place to ask, so that other people get to hear the answer as well. Otherwise, you can contact us at support@zeroturnaround.com.

If you like what you see, please give us a quick mention on your blog or twitter (you can even follow us here).

Have a great day!

Find out more:

A couple of months ago we ran a survey asking a few questions about Java EE development, containers and redeploy times. Now that over 1100 people have responded it’s time to update the results. Since we’ve had more time to analyze them we also hope to provide a few insights into the data including a more detailed container breakdown.

If you’d like to play with the results on your own we‘ve provided all the data and our calculations in a handy Excel sheet that you can download here. As a note, if you haven’t answered the 3-question survey yet, take two minutes and go for it. As more answers trickle in we’ll update this post with the new data.

The first question in the survey was “What container do you use on your largest current project?”. The breakdown follows:

Chart 1: Which Container is used most often?

chart1

We didn’t include the containers that scored less than 10 answers in the survey. These included:

  • (2) Adobe JRun
  • (1) Geronimo
  • (1) Iona
  • (7) TmaxSoft JEUS
  • (5) JONAS
  • (1) Pramati Server
  • (4) SAP NetWeaver
  • (2) Sybase EAServer

Unsurprisingly Apache Tomcat holds the lead, closely followed by JBoss. Together the OSS servers total over 70% of the responses. Although I wouldn’t go as far as to translate these numbers directly into market share, we did find studies that found similar results, courtesy of SD Times – Slight differences though: we asked which ONE container you use for your largest projects, and theirs appear to allow people to choose multiple containers.

The 2nd question we asked was, “How long does it take to restart your container and redeploy your app?”. The breakdown follows (the horizontal axis is in minutes):

Chart 2: “How long does it take to restart your container and redeploy your app?”

chart2

We previously assumed that the redeploy/restart phase lasted approximately 1 minute.  Though 38% of respondents agreed or said it was quicker than 1 minute, 62% suggested that this process lasts around 2 or more minutes.  The calculated average is approximately 2.5 minutes –indicating that we underestimated the amount of time spent on the redeploy phase.

Moving along, we asked, “In an hour of coding, how many times do you redeploy?”. The breakdown follows:

Chart 3: “How Many Times do you Redeploy in an Hour of Coding?”

chart3

The distribution seems to be close to normal, excepting the jump in the end. The average is slightly over five times an hour, which coincides with the measurements we did before.

For those who answered, “I never redeploy”, we asked some of them how they did this. Responses were:

  • “I’m not the guy that does the redeploys”
  • “We develop on embedded jetty & activemq & atomikos in debug mode instead of nearly unusable target OracleAS. So of course we need redeploy or restart jetty as usual, but not the OAS.”
  • “I’m in the very early stages of a project so a lot of out time is spent coding and testing without redeploying – typically I redeploy 3-4 times per hour”
  • “We use JavaRebel and it’s awesome” (this obviously came from someone trying to charm our development team – who are still blushing. Note – it’s now called JRebel.)

Next we did some data crunching. We assigned numeric values to each of the intervals (e.g. “3.5″ for the “3-4″ interval) and multiplied the number of redeploys an hour by the amount of time one redeploy takes (basically, Chart 2 times Chart 3), thus finding the approximate amount of time respondents spend redeploying in each hour of development. We broke down the data into five minute intervals:

Chart 4: How Much Time Does a Java Developer Spend Redeploying in an Hour of Coding? (using raw data before improving accuracy)

chart4

The average is about twelve and a half minutes per hour, accounting for more than 20% of total development time. However, the standard deviation is over 14, which means that the actual per cent varies greatly. We wanted to show more accurate data, so by looking closely and grouping results, we found this:

  • Less than 5 minutes an hour. Looking into this group we see that it is slightly skewed by the respondents who indicated that they never redeploy. We asked the people who “never redeploy” how they do it (see comments above), and they indicated that their responses were often not effective for tracking the actual redeploy time that we are trying to measure. Therefore, it makes sense to remove that data from the chart.
  • 5 to 15 minutes an hour. 45% of respondents fall into this category.
  • 20 to 25 minutes an hour.
  • Over 30 minutes an hour. Looking closer at the data we see that some of the respondents indicated that they redeploy over 60 minutes an hour (choosing both “More than 10 redeploys per hour” and “More than 5 minutes per redeploy” for Charts 2 and 3). This is quite impossible.  In fact, we believe any number over 40 minutes per hour seems to be against reason. It makes sense to remove all this data from the chart too.

The chart with the updated data looks as follows:

Chart 5: How Much Time Does a Java Developer Spend Redeploying in an Hour of Coding? (more accurate data)

chart5

The average is now ten and a half minutes per hour with a standard deviation of 8, which is more trustworthy. This translates to about 17.5% of total development time, which is considerably more than we expected. We will use this “cleaned up data” for the rest of the post.

Later we’ll describe how to calculate this over a year, but here are some quick figures:

  • 5 mins per coding hour becomes 6000 minutes annually (2.5, 40-hour workweeks)
  • 9 mins per coding hour becomes 10800 minutes annually (4.5 weeks)
  • 14 mins per coding hour becomes 16800 mins annually (7 weeks)
  • 21% of respondents report spending more than 14 mins per hour on redeploys
  • 71% of respondents report spending more than 2.5 full weeks per year, redeploying.

After looking at this issue in general, we investigated the data on a per-container basis.  This is what we found:

Chart 6: Organized By Container, How Much Time is Spent Redeploying?

chart6

There are few surprises here. Jetty is leading the pack with only 5.8 minutes per hour spent redeploying and IBM WebSphere is trailing with more than twice more — 13.8 minutes per hour. One thing to note is that although Jetty startup is undoubtedly faster than IBM WebSphere it is likely that most of the difference is due to the size of the applications deployed and the technologies used in them.

Next we have the same chart, but numbers displayed as a percent of development time (time spent per hour divided by 60).  Perhaps it’s useful to describe how we define “Development Time”.  For us, Development time is what you spend actually writing code, with an IDE, running your server and the Java language. This doesn’t include meetings, gathering requirements, smoking or any other activities that don’t involve a compiler. We’ve asked around, and it sounds like the industry assumes that 5 hours per day are spent coding.

Chart 7: Organized by Container, What Percent of Development Time is Spent Redeploying?

chart7

To put those numbers in perspective we can also calculate the amount of time spent redeploying a year. To do that, we’ll make some assumptions:

  1. We assume 48 work weeks  per year.  If you’re lucky enough to get more than 4 weeks of vacation, don’t rub it in.
  2. We assume that 5 hours per day is spent doing development. The other 3 hours are reserved for non-development activities.

The following chart displays the number of 40-hour work weeks a year spent redeploying:

Chart 8: How many 40-hour work weeks are spent on the redeploy phase, over a year?

chart8

Depending on the container, we’re looking at 3 to 7 work weeks per year, spent exclusively on the redeploy phase. The average over all of the data is slightly over 5 work weeks a year, but the standard deviation of 4 makes the range of 3-7 more reliable.

Our final graph shows the amount of time spent redeploying per container in more detail. Instead of using averages, we break down the proportion of respondents that redeploy into groups: less than 5 minutes an hour, 5 to 14 minutes and hour, 15 to 29 minutes and hour and over 30 minutes an hour.  We expect that this may show the size of projects that use different containers, and potentially shed light on the time your project spends redeploying.

Chart 9: Java EE container market penetration.

chart9

We interpret this chart as:

  • Jetty is only used in projects that redeploy quickly. This makes all kind of sense, considering that Jetty doesn’t even support redeployment and instead has extremely fast container startup.
  • Apache Tomcat and GlassFish are used in same types of project. Both are posed as fully functional yet lightweight alternatives to the classic heavy application servers. Although Tomcat is much more popular today, GlassFish is growing in popularity in the same market share.
  • JBoss, Oracle Weblogic and IBM WebSphere compete for pretty much the same market segment. The majority of their projects are large and complex, and the redeploy times reflect that.
  • Another interesting fact is that the proportion of projects in the 5-14 group is pretty stable for all containers. This likely corresponds to medium-sized projects that are not actively contested by either lightweight or classical application servers. The only exception is Jetty, which is heavily skewed to the lightweight side.

Coming up next: We’re taking a look at incremental build times and comparing Ant, Maven, Eclipse, IntelliJ, and NetBeans.  If you’re interested, take a minute to participate here. Thanks!

We’re looking into incremental builds — trying to document the differences in popularity & productivity between using tools like Ant and Maven versus IDEs.  We haven’t seen a study like this before, so thanks for taking a minute to fill this out.  If you’re interested in winning a free license of JRebel (formerly JavaRebel), include your email address in the optional email section.

For the study, click here.

Thanks,

Dave

I’m honestly not sure if anything can be read into this, but I did note that this particular company in India wasn’t looking for people with Eclipse experience – they were looking for IntelliJ and Java Rebel experience (now called JRebel)… I suppose I can assume that it has nothing to do with the JRebel for IntelliJ plugin we released today, but it did get me thinking..

Anyway, I thought I’d pass it along..

Posted on September 16th, 2009

Java/J2EE Jobs: Team Lead

Skills: Java, J2EE, Springs, iBatis, JSF, Java Rebel, IntelliJ, Selenium, Ant, MS SQL Server, Servelets, SVN

Exp: 4 – 6 Years

Job Description: Good track record. Knowledge of Hibernate, Spring FrameWork, Core Java, JSP, Servlets, JDBC Desirable Skills -Spring, iBatis, JSF, SVN, Java Rebel, IntelliJ, Selenium, Ant, MS SQL Server with 5 years of proven experience. Team Leading Capabilities. Experience on JUnit testing. Experience on any java web framework.

Location: Chandigarh, India

Salary: 4 – 6.5LPA

Thoughts?

JRebel (formerly Javarebel) uses reflection, byte code modification and other clever approaches to remove turnaround time from a developers’ daily life.  When combined with an IDE, these approaches need a little tweaking, so — The JRebel Plugin for IntelliJ IDEA focuses on improving JRebel in IntelliJ IDEA, handling debugging issues, and making it easy for you to configure JRebel, directly from the IDE interface.

Debuggers are quite happy when code does not change during your debug sessions (with the exception of hotswap) and they are a great aid for solving difficult bugs. Once JavaRebel enters the scene they can get cranky about app state, and say things like,

“What? You renamed a method? Come on, you can’t do that!”

This plugin solves debugging issues with IntelliJ.  It also improves JRebel usability significantly — Although JRebel is easy to configure, it would sure be nice to configure it from a checkbox instead of adding JVM arguments somewhere.  Now you’ll never say,

“Why do I have to write XML when I’ve actually configured my project inside the IDE already?”

This plugin allows you to skip writing the XML yourself, and generate a rebel.xml based on your IDE project configuration.

Oh – and one more thing…  Instead of tweaking JVM arguments with the javaagent or noverify flags, you can now press the JRebel launch button. It will use your regular container startup but will add the parameters itself, based on the javarebel.jar, which is specified in your settings. For a complete list of features check out the new JRebel IntelliJ tutorial.

This plugin is compatible with IntelliJ 8.x releases. To support debugging with older IDEA versions we’re still maintaining the old plugin.

More info:

For those of you who have been keeping up with recent ZeroTurnaround news, even though there are shows like Big Bang Theory to distract you, you’ll know that JavaRebel has been going through a renaming process. Instead of choosing the name ourselves, we opened up the process to anyone who wanted to contribute ideas.

One of our primary concerns in renaming JavaRebel was losing the growing audience of people who have heard about it in passing, and noted to themselves that this is a tool worth trying out.  So it was interesting to note that when community-sourcing a new name, familiar naming conventions are the most popular.

Of the 90+ comments on the renaming blog, and 100+ suggestions on our suggestion page, the name most chosen was “JRebel” — so that’s what we’re going with.

Now, there were also some VERY creative names proposed, and we’d like to thank the folks who took the time to come up with them. Here were some of our favourites:

  • RebelDeployer – from “Andy” who noted that it sounds like a Sith space ship… I thought it more relevant for the Alliance, but whatever.
  • RebelRebel (full of Bowie connotation) – from “Peter” and “CPJ”
  • Continuity – from kodeninja
  • JivaRebel – according to Chaikhanna, “Jiva” is Sanskrit for the immortal essence of a living being, which survives physical death. Or, in this case, repeated reloads leading to some refinement of the original.
  • Diponegoro – according to Hannu, “Diponegoro” was a Javanese prince who was the leader of the rebels in the Java War 1825-1830. A perfect historical match for words Java and Rebel.

And a few more that made us laugh:

  • JFireStarPowerLavaInfernoRebel – by Felipe Soares
  • 44 Magnum or just Magnum. Tark Sammons comment was: “Think “Dirty Harry”, especially the “do you feel lucky punk” speech. It says fun, playful, and serious all at the same time. It conjures up images of Dirty Harry pointing a 44 Magnum at Eclipse while it is “Building Workspace” and reloading the context and putting that whole process out of its misery.”  — Note: of course, I’m pretty sure that 44 Magnum is copyrighted too ;-)
  • TheTotallyAwesomeAppFormerlyKnownAsJavaRebelWhichHadToBeRenamedDueToSome*$&#^$# Lawyers ;-)  — Note: Come on guys, it’s not their fault, they’re just doing their best to protect their IP, which is something I think everyone understands.  If anything, our growing success and public recognition brought this upon us, so we’re not too worried about it.  The key thing to take away from this is: we’re growing fast, lots of new people are talking about JRebel (formerly JavaRebel ;-), and the value of the tool for users is more important than any name we could call it.  “A rose by any other name would smell as sweet… “, know what I mean?

Moving forward, we’ve got a lot of things to change, not least of all the…

  • Core
    • Release archive
    • javarebel.jar and boot loading
    • SVN hosted dist/web docs (FAQ, Install etc)
    • License generator + internals
    • JR banners
    • Test server container startups
    • Hudson/Matrix integration
    • Email templates
  • Plugins
    • JavaRebelJSFPlugin
    • MavenJavaRebelPlugin
    • IntelliJ Plugin
    • NetbeansPlugin
    • Eclipse
    • aspectj-jr-plugin
    • guice-jr-plugin
    • jboss-jr-plugin
    • jr-integration
    • jr-sdk
    • jr-servlet-integration
    • jr-utils
    • spring-jr-plugin
    • spring-mvc-jr-plugin
    • struts2-jr-plugin
    • tapestry4-jr-plugin
    • velocity-jr-plugin
    • wicket-jr-plugin
    • jr-autotest
    • jr-servlettest
    • jr-autotest-hudsonplugin
    • jr-idea
    • jr-old-idea
  • Infrastructure
    • Current online public docs
      • Website logos
      • Static content
      • Blog
    • Smart URLs zt.com/jrebel vs zt.com/javarebel

… hmm… and the list goes on.

We’re going to update as many of these as possible, as fast as possible, but if we miss something, feel free to let us know (as long as you do this after Sept 16th – give us a week at least, k?).  If you’ve ever posted anything about JavaRebel, and you’re the organized sort of person who likes to keep things in the right place, it would be cool if you could update that too.   “JRebel (formerly JavaRebel)” would be most appropriate.

From now on, you can link directly to www.zeroturnaround.com/jrebel/ or even www.jrebel.com

For everyone who participated in the renaming – we heartily thank you for your input, and look forward to hearing more from you!  If you’re interested in letting us know what you think about JRebel (the tool, not the name), let us know here.

Although this tutorial concerns the Tomcat container, exactly the same instructions also can be used for JBoss and Jetty containers.

Compared to other containers out there, the Tomcat web container is one of the fastest when it comes to startup and redeploy times. Still, in a survey we conducted, developers estimate spending 18% of their coding time (about 145 hours annually, per developer – somewhere between 3-4, full, 40-hour workweeks) waiting for applications to redeploy. JRebel eliminates the need to redeploy in 80% of situations, and it’s easy to get started. In the embedded video you can take a quick look at how coding looks when using JRebel.

Tutorial

In this tutorial we explain how to install and use it step-by-step. We assume that you are using Eclipse 3.x with Tomcat 5.x or later. Most of the steps will be applicable to other versions as well, but it may look different from the screenshots included.

Contents:

STEP 1: Install JRebel

The latest stable version of JRebel can be downloaded here. Unpack it to a directory of your choice.

2009-07-03_124429

STEP 2: Installing JRebel Eclipse IDE plugin

The JRebel Eclipse IDE plugin was introduced with JRebel 2.0 and makes configuring and using JRebel considerably easier. You can install the plugin by going to Help » Software updates » Available software » Add site and use the http://www.zeroturnaround.com/update-site/ URL as the update site.

2009-07-15_142449

STEP 3: Make a rebel.xml for your application

In order to do it’s magic, JavaRebel needs to know where your classes and resources are. We’ll use a rebel.xml configuration file to tell it. This is mandatory when you deploy your app as a WAR/EAR. You’ll need to have one rebel.xml file per module. This includes both web and EJB modules. The rebel.xml configuration file should be placed in your WEB-INF/classes directory in the case of a web module and in the jar root in the case of an ejb module. Put it in the root of a source or resource folder in your project (the same place where the .properties files are).

If you use Maven you can use the JavaRebel Maven plugin that will generate the rebel.xml in accordance with the module pom.xml as described in the Maven Plugin configuration manual.

In 99% of cases, you probably use one module per project. In these cases, the JavaRebel Eclipse IDE plugin can generate the rebel.xml file for you, on a per project basis. If your project is one of the exceptions, edit the file manually as described in the Installation manual, otherwise generate the rebel.xml like this:

Click on your project and pick Generate rebel.xml.

2009-07-15_143501

Repeat this for all projects that you’d like to update with JRebel.

If you’d like to use one rebel.xml for your whole team, start with the generated rebel.xml, then replace the absolute paths to your workspace with a system property. JavaRebel will expand expressions like “${myProject.root}” in rebel.xml to a system property that you can pass to the application container as -DmyProject.root=c:/myWorkspace/myProject. This allows to you to use a single configuration for everyone and then customize it when starting the server.

STEP 4: Configuring the Eclipse WTP IDE

You may skip this step if you run Tomcat outside of the Eclipse IDE.

Open the Servers View and double click the Tomcat Server that your application is deployed to (if you don’t see the Servers View go to Window » Show View » Servers).

2009-07-15_144828

Open Publishing and choose Never publish automatically.

2009-07-15_144654

It may seem strange to disable automatic publishing, but as JRebel will take care of updates from now on it would just slow you down.

Open JavaRebel Integration and check Enable JavaRebel agent.

2009-07-15_145028

STEP 5: Configuring the Eclipse IDE

Go to Window » Preferences and from there to Java » Debug » Step Filtering.

Check Use Step Filters, Filter synthetic methods, and Step through filters. Now check all the default filters and use the Add Filter button to add com.zeroturnaround.* and org.zeroturnaround.*.

2009-07-03_143321

Now go to Project » Build automatically and make sure it is checked.

2009-07-03_144612

STEP 6: Success!

To check that the installation was successful, access a page that uses a class, change that class in the IDE, press Save, access the page again and look for the following message in the console:

2009-07-15_150006

Now that you’re up and running, it’s time to enjoy coding without the need to redeploy. If you have any specific questions JRebel, the Forum is the best place to ask, so that other people get to hear the answer as well. Otherwise, you can contact us at support@zeroturnaround.com.

If you like what you see, please give us a quick mention on your blog or twitter (you can even follow us here).

Have a great day!

Find out more:

We’re glad to announce the JavaRebel 2.0.3 release. It is a maintenance release incorporating all the bugfixes that have accumulated during the past two months. It also updates the bundled plugins to the latest versions.

Changes include:

  • Significantly improved Spring classpath* resolution which could previously lead to duplicate beans and conf files to be found.
  • Support for IBM WebSphere 6.0
  • Statistics now displays the number of elapsed days if less than 30.
  • Fixed an issue causing IllegalMonitorStateException to be thrown from changed synchronized methods.
  • Fixed an issue that caused AccessControlException on Sun App Server 8.2.
  • Fixed an issue that caused a wrong SerialVersionUID to be generated.
  • Fixed and issue with Class.getMethods() returning in random order (caused Flex failure).
  • Fixed an issue that caused CurrentModificationException in Spring plugin.

You can pick up the new version on our download page, by clicking the standard download.

« Newer Entries | Older Entries »

Join the Rebellion Facebook Twitter RSS feed