<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    I want to fly higher
    programming Explorer
    posts - 114,comments - 263,trackbacks - 0
    1.我為什么用JRebel ?
        Becuase Spring-Loaded 1.2.3 can't reload classes packaged in JAR files. This is coming in the next release, 1.2.4.
            即Spring-Loaded 1.2.3不支持reload jar,而這個特性是我最關心的

    2.JRebel在eclipse reload class的話和spring-loaded基本一致,可參考我寫的這篇文章:http://m.tkk7.com/landon/archive/2015/06/19/425797.html
        VmArguments:
            -agentpath:C:\Users\pc\Desktop\jrebel-6.2.0-crack\lib\jrebel64.dll -noverify
        注:1.本人用的是6.2.0的破解版本,如何獲取該版本,我不予置評。
              2.對于-javaagent模式,我本地測試并卵,所以用了-agentpath模式,測試Ok.

    3.如何確定JRebel啟動成功并reload了classes
        這是我在eclipse中測試的一個輸出:
      六月 26, 2015 10:40:26 上午 java.util.prefs.WindowsPreferences <init>
      WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx() returned error code 5.
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  #############################################################
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  JRebel Agent 6.2.0 (201505201205)
      2015-06-26 10:40:29 JRebel:  (c) Copyright ZeroTurnaround AS, Estonia, Tartu.
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  Over the last 1 days JRebel prevented
      2015-06-26 10:40:29 JRebel:  at least 1 redeploys/restarts saving you about 0 hours.
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  Licensed to anonymous-user
      2015-06-26 10:40:29 JRebel:   with the following restrictions: 
      2015-06-26 10:40:29 JRebel:   ####### Cracked by anonymous-user, For FUN! Unlimited! Enjoy! ######
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  License type: perpetual
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel:  #############################################################
      2015-06-26 10:40:29 JRebel:  
      2015-06-26 10:40:29 JRebel: 
      2015-06-26 10:40:29 JRebel: A newer version '6.2.1' is available for download 
      2015-06-26 10:40:29 JRebel: from http://zeroturnaround.com/software/jrebel/download/
      2015-06-26 10:40:29 JRebel: 
      reload
      reload
      reload
      reload
      reload
      reload
      reload
      2015-06-26 10:40:49 JRebel: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx() returned error code 5.
      reload
      2015-06-26 10:40:51 JRebel: Reloading class 'com.mavsplus.example.springloaded.Reload'.
      load
      load
      load

    4.JRebel如何reload classes in jar
        這個是我關心的重點,因為我做的是游戲服務器開發,線上部署的通常是一個jar,然后指定jvm參數,腳本啟動。如線上可以分為一個mainLaunch.jar,一個reloadLogic.jar,后者jar為可reload的邏輯代碼。那么問題就是線上如果需要更新reloadLogic.jar,怎么辦?用JRebel.
        1. startup.bat 啟動腳本(脫離eclipse)
    @echo off

    cd /d %~dp0

    java  -Drebel.dirs=E:\mavsplus\reload\classes
    -Drebel.log=true 
    -agentpath:C:\Users\pc\Desktop\jrebel-6.2.0-crack\lib\jrebel64.dll 
    -noverify 
    -cp mainLaunch.jar;reloadLogic.jar com.mavsplus.example.jrebel.JRebelExample   
         -Drebel.dirs用來指定Jrebel監視reloadLogic.jar的class變化,即如果我們線上想更新reloadLogic.jar時,可以打包新的reloadLogic.jar->上傳到該目錄->解壓->classes至該目錄
            -->該目錄發生變化,則線上reloadLogic.jar的業務也會馬上變化

    5.JRebel是否可用于線上生產環境?
        1.引用JRebelWhitePaper2014.pdf的一段話:
            JRebel is a –javaagent plugin for the JVM. It's a downloadable .jar file, available as a standalone .zip distribution or as an IDE plugin for Eclipse, IntelliJ IDEA or NetBeans IDE. 【JRebel will cause around 10-15% performance overhead, however during development this is more or less unnoticeable, unlike in the production environment.】
            即JRebel會有很大的性能損失,所以不建議生產環境使用,只建議開發環境,方便部署和調試。
        2.那么我就想用JRebel在線上生產環境怎么辦?
            zeroturnaround公司之前還有一個產品叫做liverebel,可用于線上環境。但是由于未能引起足夠的消費者關注,所以在2014年11月也停止了。。。
        3.其實JRebel和Spring-Loaded就是一個開發環境下的利器,skip build and redeploy process,大大提升了工作效率!而非生產環境的利器。。。因為線上reload本來風險就很大。

    6. 其他相關
        1. https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/
        2. https://wikis.oracle.com/display/mlvm/HotSwap
        3. http://www.hotswapagent.org/
        4. https://github.com/dcevm/dcevm

    7.后續
       我會繼續研究Java的HotSwap/HotDeploy/HotReplace/OSGI等
    posted on 2015-06-26 18:48 landon 閱讀(4678) 評論(0)  編輯  收藏 所屬分類: JVM 、HotSwap
    主站蜘蛛池模板: 好湿好大好紧好爽免费视频| 亚洲香蕉在线观看| 乱爱性全过程免费视频| 久久WWW免费人成人片| 亚洲色图视频在线观看| 久久aa毛片免费播放嗯啊| 亚洲日韩精品一区二区三区无码 | 久久国产乱子伦精品免费午夜 | 国产精品高清视亚洲一区二区| 最近免费视频中文字幕大全| 久久精品国产亚洲AV麻豆网站 | 亚洲第一街区偷拍街拍| 高清国语自产拍免费视频国产| 亚洲精品日韩一区二区小说| 暖暖免费高清日本一区二区三区| 亚洲字幕AV一区二区三区四区| 日韩高清免费观看| 免费在线观看一区| 久久99国产亚洲高清观看首页| 国色精品va在线观看免费视频| 亚洲乱亚洲乱淫久久| 亚洲免费黄色网址| 亚洲乱色熟女一区二区三区蜜臀| 麻豆国产精品入口免费观看| 成在线人直播免费视频| 亚洲AV无码一区二区二三区入口 | 好久久免费视频高清| 亚洲国产精品张柏芝在线观看| 毛片免费在线播放| 一级黄色免费毛片| 亚洲第一视频网站| 午夜色a大片在线观看免费| a高清免费毛片久久| 亚洲一卡2卡三卡4卡有限公司| 亚洲欧洲免费无码| 在线播放免费人成视频网站| 亚洲视频在线观看免费| 免费鲁丝片一级观看| 一级特黄录像免费播放肥| 亚洲中文字幕久久精品无码2021| 又黄又爽无遮挡免费视频|