Book Image

Instant JRebel

By : Jonathan Lermitage
Book Image

Instant JRebel

By: Jonathan Lermitage

Overview of this book

JRebel is a JVM plugin that lets Java developers update code instantly and see their changes reflected in their application under development without restarting the application server. JRebel is a plugin for anything that is in Java and is also IDE neutral. If you want to update your code instantly without compiling and deploying the code repeatedly, this book is for you.This book will focus on the most important development steps and will also help you save time which is otherwise spent on compilation and deployment of code. You will learn how to use JRebel with the most popular IDEs and Java servers and how to accelerate the development of your current and future Java SE and Java EE projects.This book shows you how to install JRebel, configure your favourite IDE and Java server for JRebel, and start using it on your projects.With this book, you will learn how to get a free license for JRebel and how to integrate JRebel with most Java servers and development environments. To finish, you will see how to work with desktop and web projects and how to utilize JRebel to dramatically accelerate their development.
Table of Contents (7 chapters)

Discovering LiveRebel (Become an expert)


JRebel is able to dramatically accelerate your developments, but it works for development phases only. You probably won't use JRebel with a production server. Of course, you could use an IDE, connect it to your production server, and use this system to keep your deployed applications up-to-date, but you would rapidly encounter problems—you have to use only one IDE to update your applications. This scenario is not suitable for a team of developers, and it is unprofessional.

An appropriate solution is LiveRebel. Since JRebel is ideal for the development stage, LiveRebel is designed to help you keep your production applications up-to-date, without any restart or redeployment.

LiveRebel is a link between your production environment and your continuous-integration server. More precisely, it is able to use your continuous-integration server to get the latest build and update your deployed application with it, live.

LiveRebel is very configurable and platform agnostic, which means it is not limited to Java! For details, please visit http://zeroturnaround.com/software/liverebel/what-we-support/#headline. Also, note that LiveRebel comes with a free license that is valid for one year and works for two nodes (environments). LiveRebel commercial licenses are sold as annual licenses per JVM instance. You can get details by visiting http://zeroturnaround.com/liverebel/pricing/.

How to do it...

The following are the general steps on how to install LiveRebel and connect it to your environment:

  1. These general steps will help you to prepare a testing environment and accelerate your deployments with LiveRebel. Set up a version-control system, such as Subversion, Mercurial, or Git.

  2. Set up a continuous-integration server, such as TeamCity, Jenkins, Hudson, or Bamboo.

  3. Set up your (pre)production application server and database (for example, Tomcat and MySQL).

  4. Optionally, configure your favorite IDE to use your versioning system and continuous-integration server.

  5. Visit http://zeroturnaround.com/software/liverebel/ to get LiveRebel.

  6. You will get the final download link by e-mail, with a license key. Download LiveRebel and unzip it.

  7. Run the bin/lr-command-center script (BAT or SH, depending on your platform).

    LiveRebel command center startup

  8. Open the URL displayed in the console. To log in, please use information received by mail (with your license key). Create a user.

  9. Use the ADD SERVER button to add your production application server, and follow the steps displayed in your Internet browser.

  10. Use your IDE to modify code, commit to your versioning system and observe live changes on your production application.

How it works...

After code is committed or schedule, your continuous-integration server will release a new build, and LiveRebel will simply use it to update your production application, live.

This way, you neither have to install updates manually, nor restart or redeploy anything.

There's more...

Since LiveRebel is a complex and large subject (you can configure a lot of features), it cannot fit in this short book. For details about LiveRebel installation, configuration, and capabilities, please visit its online documentation. Also, you may find helpful information at http://manuals.zeroturnaround.com/liverebel/index.html.