Search code examples
javaintellij-ideagradlejrebel

Does JRebel work with embedded application servers? (IntelliJ)


I am using a Gradle script to deploy to either a Jetty or Tomcat plugin. I'm doing it within IntelliJ, and I've installed the JRebel plugin for intellij.

When I use the plugin to run my Gradle script, I don't think JRebel can make sense of where to put updated class files. Is there a way to tell it?

Alternatively, I've tried deploying to a standalone Tomcat server (through IntelliJ) but it keeps getting PermGen errors and makes my IDE freeze up. I've read hints that the slowness could have to do with using the Ajc compiler, is that true? Also, in the Tomcat configuration I've added some pretty generous CATALINA_OPTS (-Xms512m -Xmx2048m). Would they be getting overwritten by the JAVA_OPTS passed in by JRebel? I can't imagine I'd need to allocate even more memory...


Solution

  • Yes, it does work with the Tomcat plugin if you run it from the command line. Please see the FAQ section of the plugin for a full explanation on how to set it up. I am not sure about the JRebel plugin within IntelliJ though. You can simply run the task tomcatRun from IntelliJ using the JetGradle plugin (IntelliJ's Gradle integration).