This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. JRebel
JRebel (formerly known as JavaRebel) is a solution by ZeroTurnaround that enables instant reloading of changes made to a Java class file.
How it works #
Hot deployment based on Java HotSwap #
With some IDEs you can perform changes on your java classes, compile them and test the results without redeploying the project or restarting your server. This approach is based in JVM HotSwap.
HotSwap allows debuggers to update class bytecode, using the same class identity. This meant that all objects could refer to an updated class and execute new code when their methods were called, preventing the need to reload a container whenever class bytecode was changed
Unfortunately, this redefinition is limited only to changing method bodies -- it cannot either add methods or fields or otherwise change anything else, except for the method bodies. Neither can you "hot deploy" JSPs and some other resources.
Hot deployment beyond HotSwap with JRebel #
To support the "hot deployment" of deeper changes in Java classes, you can use JRebel technology. JRebel installs a -javaagent that monitors the classes and resources in the workspace and propagates their changes to the running application. The following types of changes are supported:
- Changes to Java classes beyond what is supported by HotSwap (like method signatures).
- Changes to framework configuration (e.g. Spring XML files and annotations, Struts mappings, etc).
- Any changes to static resources (e.g. JSPs, HTMLs, CSSs, XMLs, .properties, etc
Here you can learn more about how Java HotSwap and JRebel work:
Download #
You can downloada JRebel free 30-day version of JRebel Enterprise, which provides a License Server to enable floating licenses, team reporting and centralized license management.
For non-commercial developers there is also a JRebel Social version http://zeroturnaround.com/jrebel/jrebel-social-tutorial.
Speeding up Liferay deployment with JRebel #
Learn how to setup an Optimal Liferay Core Development with JRebel.