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
- STEP 2: Installing JRebel Eclipse/RAD IDE plugin
- STEP 3: Make a rebel.xml for your application
- STEP 4: Configuring IBM Rational Application Developer
- STEP 5: Configuring Eclipse/RAD IDE
- STEP 6: Success!
STEP 1: Install JRebel
The latest stable version of JRebel can be downloaded here. Unpack it to a directory of your choice.

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.

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

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.

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

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).

Open Publishing and choose Never publish automatically.

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.*.

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

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:

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:
-
DaveL
-
http://citystreetsboard.com/forums Monopoly
-
Jan
-
Junmin Storage


