Does JRebel work with embedded application servers? (IntelliJ)

I am using a Gradle script to deploy to a Jetty or Tomcat plugin. I am doing this inside IntelliJ and I have installed the JRebel plugin for intellij.

When I use the plugin to run my Gradle script, I don't think JRebel can figure out where to put the updated class files. Is there a way to tell about this?

Alternatively, I tried to deploy to a standalone Tomcat server (via IntelliJ), but it keeps getting PermGen errors and forces me to freeze the IDE. I read the clues that the slowness might be due to using the Ajc compiler, is this true? Also, I added some pretty generous CATALINA_OPTS (-Xms512m -Xmx2048m) in Tomcat config. Will they be overwritten by JAVA_OPTS passed by JRebel? I can't imagine I need to allocate even more memory ...


source to share

2 answers

Yes, it works with the Tomcat plugin if you run it from the command line. See the FAQ section in the plugin for a complete explanation on how to configure it. However, I'm not sure about the JRebel plugin in IntelliJ. You can just run the task tomcatRun

from IntelliJ using JetGradle plugin (IntelliJ Gradle Integration).



What you need is the correct rebel.xml which will tell JRebel where the compiled classes are. It can easily be generated using the JRebel plugin for IntelliJ - right click on the project and click "Generate rebel.xml"

To work around PermGen errors, you need to use the -XX: MaxPermSize option as mentioned above.



All Articles