JavaRebel is a java agent that reloads changes in Java classes on-the-fly, without redeployments or server restarts. The version currently supported is JavaRebel 1.2 and greater.
Changes to action classes or to any class that contains validated attributes are detected and applied immediately. To test it:
Next time you start the server JavaRebel should display something like this at the beginning of your log:
########################################################## # ZeroTurnaround JavaRebel 2.0 # # ... # ##########################################################
Any modification to Action or JPA classes will be detected and applied on the next browser request.
JavaRebel: Reloading class 'org.loom.demo.model.Mortgage'. 13:51:37,014 INFO [ReloadableActionMappingRepository] Reloading action: org.loom.demo.action.ebanking.MortgagesAction 13:51:37,015 DEBUG [ActionMapping$$M$38b15290] Available events for org.loom.demo.action.ebanking.MortgagesAction are [ save, preEdit, delete, listAll ] 13:51:37,015 DEBUG [AnnotationProcessorRepository] Start processing annotations for org.loom.demo.action.ebanking.MortgagesAction
Notice that modifications to existing Actions will be detected, but new Action classes will not.
Jetty has a ClassLoader model that breaks when trying to use JavaRebel. To put together Loom, JavaRebel and Jetty you will need to do one of the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="parentLoaderPriority" type="boolean">true</Set>
</Configure>