270 likes | 473 Views
JREBEL FOR ECLIPSE. ECLIPSE DAY CHINA 2013. PRESENTER. ANTON ARHIPOV @ antonarhipov PRODUCT MANAGER. BASED ON JAVAAGENT TECHNOLOGY DISTRIBUTED AS IDE PLUGIN Eclipse , incl. MyEclipse , RAD, etc Also: IntelliJ IDEA, NetBeans , JDeveloper. A PRODUCTIVITY TOOL FOR JAVA DEVELOPERS.
E N D
JREBEL FOR ECLIPSE ECLIPSE DAY CHINA 2013
PRESENTER ANTON ARHIPOV @antonarhipov PRODUCT MANAGER
BASED ON JAVAAGENT TECHNOLOGY • DISTRIBUTED AS IDE PLUGIN • Eclipse, incl. MyEclipse, RAD, etc • Also: IntelliJ IDEA, NetBeans, JDeveloper A PRODUCTIVITY TOOL FOR JAVA DEVELOPERS
THE TURNAROUND MAKE CHANGES BUILD, DEPLOY, WAIT AVERAGE: 2.5 min OBSERVE RESULTS
THE TURNAROUND MAKE CHANGES BUILD, DEPLOY, WAIT OBSERVE RESULTS NO BUILD! NO REDEPLOY! NO WAITING!
WASTED TIME 1-60 sec 30 sec – 30 min ~1min APPLICATION STARTUP SERVER STARTUP IN-APPLICATION NAVIGATION
HOW TO RELOAD A CLASS? Old Class Loader New Class Loader MyClass MyClass’ MyObject MyObject TRANSFER THE STATE
serialize/deserialize init() Session Session Classes Sevlet NewClasses Sevlet App State App State Libraries New Libraries OldClassLoader NewClassLoader THIS IS WHAT EVERY APPLICATION SERVER DOES
Session Session Classes Sevlet NewClasses Sevlet App State App State New Libraries OldClassLoader NewClassLoader CLASS LOADERS ARE EASY TO LEAK!
THE REALITY: CLASS LOADERS ARE NOT GOOD FOR RELOADING CLASSES
HotSwap Make changes OldClassLoader Debugger MyObject.class HotSwap New code 111000100 101010010 Code101000101 100010010 New code 111000100 101010010 MyObject
Maybe one day Java gets a better HotSwap: • JEP 159: Enhanced Class Redefinition • But class reloading is not enough for real applications!
JRebel Make changes OldClassLoader JRebel Framework MyObject.class Code101000101 100010010 New code 111000100 101010010 Configuration (XML, annotations,..) MyObject
By starting the container you will see JRebel messages like below
REBEL.XML JRebel monitors directories specified in rebel.xml
INSTANT CLASS RELOADING JRebel reloads only what’s changed
FRAMEWORK CONFIGURATIONS JRebel understands framework configuration files
http://zeroturnaround.com/software/jrebel/features/frameworks/http://zeroturnaround.com/software/jrebel/features/frameworks/
Questions? • @antonarhipov • anton@zerotunraround.com • http://www.jrebel.com