Tuesday, February 21, 2017

Step-by-Step installation of JRebel for Hybris


  • Download the current version of JRebel here: http://www.zeroturnaround.com/jrebel/current/ (Select the Generic ZIP archive version, as we are not going to use the installer.)
  • Extract the zip to a directory of your choice. This manual will refer to this directory as JREBEL_HOME(say C:/jrebel) directory
  • Create a conf directory inside the JREBEL_HOME directory Download the JRebel configuration property file : jrebel.properties (attaching the contents of the file here )to the JREBEL_HOME/conf directory
  • To install JRebel for Eclipse, open the Eclipse Marketplace Client (Help -> Eclipse Marketplace…). Select “Eclipse Marketplace” and search for “JRebel”. Then just click the “Install” button next to it. (Installation steps are there in http://www.zeroturnaround.com/jrebel/eclipse-jrebel-tutorial/ )
  • Select features and finishing the Install Process
  • After restarting the IDE, if you do now have JRebel license installed yet, the plugin will notify you about registration/acitvation. Click on the link in the red pop-up and proceed with the license setup. By clicking on the link the plugin will take you to the JRebel activation window where you will have to select which license you would like to apply for
  • Place the license in the activation text area and press evaluate
  • Enable “Build Automatically” mode in eclipse
  • Right click on the project and select the context menu JRebel->Add JRebel Nature for all the projects where you are planning to create/change classes. For eg. samplecore & samplestorefront
  • Open project.properties file in the platform folder and add the(-javaagent:"C:/jrebel/jrebel.jar=de.hybris.tomcat.HybrisWebappClassLoader60" -Drebel.log=true) to the tomcat.debugjavaoptions & tomcat.generaloptions. That means that you now got the following in the file
          tomcat.debugjavaoptions=-Xverify:none -      javaagent: "C:/jrebel/jrebel.jar =   
         de.hybris.tomcat.HybrisWebappClassLoader60" -Drebel.log=true -Xmx1G -Xdebug 
         -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

         tomcat.generaloptions=-Xverify:none -javaagent:"C:/jrebel/jrebel.jar= 
        de.hybris.tomcat.HybrisWebappClassLoader60" -Drebel.log=true -Xmx1G 
        -XX:MaxPermSize=300M -ea -Dcom.sun.management.jmxremote 
        -Dcom.sun.management.jmxremote.authenticate=false 
        -Dcom.sun.management.jmxremote.ssl=false 
        -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true 
        -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" 
        -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% 
        -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties 
        -Djava.util.logging.config.file=jdk_logging.properties 
        -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"
  • Restat the hybris server

1 comment:

  1. If you are using JRebel with Hybris you should also check the following Video in order to increase the performance even more: https://www.youtube.com/watch?v=NHtMg8vZfdI&feature=youtu.be

    ReplyDelete