Zero redeployment with JRebel

895 views

Published on

JRebel traning at eXo

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
895
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Zero redeployment with JRebel

  1. 1. Zero redeployment with JRebel Minh Hoang TO Portal Team
  2. 2. Agenda 1. JRebel 2. GateIn zero-redeployment 3. How does JRebel work? www.exoplatform.com - Copyright 2012 eXo Platform 2
  3. 3. JRebelwww.exoplatform.com - Copyright 2012 eXo Platform 3
  4. 4. - Developer(s): Zero Turnaround- Written in: Java- License: Proprietary- Highlighted features: Immediately visible code changes without redeploying Easy installation and simple configuration www.exoplatform.com - Copyright 2012 eXo Platform 4
  5. 5. Free license plansOSS planCommiters of Open Source projects have access to free licenseSocial planFree license in exchange of privileged to post on Twitter/Facebook account www.exoplatform.com - Copyright 2012 eXo Platform 5
  6. 6. GateIn zero-deployment www.exoplatform.com - Copyright 2012 eXo Platform 6
  7. 7. GateIn code changes in IDE are reflected immediately on browser without theneed of redeploying. Say GOODBYE to tedious redeploy work Productive dev environment applicable to any eXo product: Social, Wiki, Forum, ECMS, Platform www.exoplatform.com - Copyright 2012 eXo Platform 7
  8. 8. Demo- Targeted Maven artifacts: exo.portal.webui.portal (basic UI components of GateIn portal) exo.portlet.exoadmin (core portlets of GateIn)- Expectation: Code changes on portal/portlet components from those two artifacts take effect on browser without the need of redeploying .war to Tomcat www.exoplatform.com - Copyright 2012 eXo Platform 8
  9. 9. Before demo1. Customize packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein-dev.sh2. Generate rebel.xml in targeted Maven artifacts3. Build and run GateIn www.exoplatform.com - Copyright 2012 eXo Platform 9
  10. 10. rebel.xml www.exoplatform.com - Copyright 2012 eXo Platform 10
  11. 11. rebel.xml www.exoplatform.com - Copyright 2012 eXo Platform 11
  12. 12. JRebel agent starts www.exoplatform.com - Copyright 2012 eXo Platform 12
  13. 13. Demo starting ... www.exoplatform.com - Copyright 2012 eXo Platform 13
  14. 14. How does JRebel work? www.exoplatform.com - Copyright 2012 eXo Platform 14
  15. 15. Object & Class MyObject obj = new MyObject(); Class<?> type = obj.getClass();1. Behavior of method call on obj is determined by type2. type is identified by MyObject.class bytecode and context ClassLoader of the code MyObject obj = new MyObject();3. Once loaded, type could not be unloaded or changed (class loader holds avector of loaded classes)4. JRebel approach to redefine type Black box as JRebel is not open source! But described as a combination of Instrumentation API + Byte code handling + Class loader www.exoplatform.com - Copyright 2012 eXo Platform 15
  16. 16. Class redefinition www.exoplatform.com - Copyright 2012 eXo Platform 16
  17. 17. MANIFEST.MF www.exoplatform.com - Copyright 2012 eXo Platform 17
  18. 18. JRebel agentThe code in AgentInstall is likely to be www.exoplatform.com - Copyright 2012 eXo Platform 18

×