Upload
rachael-putt
View
222
Download
2
Tags:
Embed Size (px)
Citation preview
JREBEL FOR ECLIPSEECLIPSE DAY CHINA 2013
PRESENTER
ANTON ARHIPOV@antonarhipovPRODUCT 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
MAKECHANGES
BUILD,DEPLOY,
WAIT
OBSERVERESULTS
AVERAGE: 2.5 min
THE TURNAROUND
MAKECHANGES
BUILD,DEPLOY,
WAIT
OBSERVERESULTS
NO BUILD!NO REDEPLOY!NO WAITING!
~1 min30 sec – 30 min1-60 sec
IN-APPLICATION NAVIGATION
APPLICATION STARTUP
SERVER STARTUP
WASTED TIME
HOW TO RELOAD A CLASS?
Old Class Loader
MyClass
MyObject
NewClass Loader
MyClass’
MyObject
TRANSFER THE STATE
Classes
Libraries
OldClassLoader NewClassLoader
Sevlet New ClassesNew
Libraries
Sevlet
Session Session
init()
App State
App State
serialize/deserialize
THIS IS WHAT EVERY APPLICATION SERVER DOES
Classes
OldClassLoader NewClassLoader
Sevlet New ClassesNew
Libraries
Sevlet
Session Session
App State
App State
CLASS LOADERS ARE EASY TO LEAK!
THE REALITY: CLASS LOADERS ARE NOT GOOD
FOR RELOADING CLASSES
MyObject
MyObject.class
OldClassLoader
Code101000101100010010
Debugger
HotSwap
New code111000100101010010
New code 111000100101010010
HotSwapMake changes
JRebel vs HotSwapHotSwap JRebel
Changing method bodies + +Adding/removing methods - +Adding/removing constructors - +Adding/removing fields - +Adding/removing classes - +Adding/removing annotations - +Replacing superclass * - -Adding/removing implemented interfaces *
- -
• Maybe one day Java gets a better HotSwap:–JEP 159: Enhanced Class Redefinition
• But class reloading is not enough for real applications!
MyObject
MyObject.class
OldClassLoader
Code101000101100010010 New code
111000100101010010
JRebel
Fram
ewor
k
Configuration(XML, annotations,..)
JRebelMake changes
JRebel does NOT create new class loaders to
update classes!
DEMO TIME!
GET AT ECLIPSE MARKETPLACE
ADD JREBEL NATURE
ENABLE JREBEL AGENT
JREBEL CONFIG CENTER
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/
Questions?
• @antonarhipov• [email protected]• http://www.jrebel.com