Download JavaRebel Brings Class Reloading to Java

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Applications of dynamic Java class reloading: long-lived Java web applications
(e.g. Servlets), remote code deployment to distributed systems (PCs or WSNs) (those
systems are rarely), critical applications (e.g. security or surveillance apps) where
rebooting may cause intolerable service discontinuity.
JavaRebel Brings Class Reloading to Java
Posted by: Jevgeni Kabanov on ????????? 09, 2007 DIGG
JavaRebel reloads changes to Java classes on-the-fly without redeploy or restart
including new methods and fields. It is a generic solution that works for standalone
Java applications as well as application servers. For the impatient: watch the
demonstration screencast (~5 mins) and download.
Ever since HotSwap support has been introduced in Java 1.4 people have been
craving for more. As witnessed by this bug in the Sun database and numerous other
discussions changing method bodies was just not enough. Dynamic languages like
Ruby were quick enough to capitalize on this lack, touting Java EE development as
slow and cumbersome.
As time passed by, people have tried to work around the limitation by reloading
classes along with their classloader. However since this requires reconstruction of the
object state, it will only work in a controlled and limited environment — e.g. that of a
web framework like RIFE, Tapestry 5 and so on.
Just as many others, we were working on a workaround. However, instead of limiting
ourselves to the facilities provided by the Java platform, we devised a whole new
approach. Using bytecode modification and a little bit of magic, JavaRebel extends
the JVM with the ability to reload almost arbitrary changes to classes on-the-fly. This
includes adding and removing both methods and fields and the only forbidden
changes are to 'extends' and 'implements' clauses. Since all the existing object
instances are preserved the application and server can continue running and code
changes are immediately visible in the application.
Watch the demonstration screencast (~5 mins), read the feature list or just download
JavaRebel from ZeroTurnaround.com and give it a try. Disclaimer: JavaRebel is
commercial software with a free trial for 14 days and developer seat cost at 99$.
OTHER APPROACHES: Java Hotswapping
Forum discussion about class reloading:
http://forums.java.net/jive/thread.jspa?forumID=23&threadID=481&messageID=1
2422#12422
Hotswapping with Ant: https://hotswap.dev.java.net/
reloading classes : Java Glossary http://mindprod.com/jgloss/reloading.html
e69. Dynamically Reloading a Modified Class:
http://exampledepot.com/egs/java.lang/ReloadClass.html
UNLOADING AND RELOADING CLASSES:
http://java.sun.com/developer/JDCTechTips/2003/tt0819.html#2