1

I have an Eclipse plugin that works as a light host and it is possible to run applications on it. I am trying to improve the development process and thought about using JRebel.

According to what I am reading in the FAQ, the JVM runs happily with JRebel jar as a plugin and any class declared for JRebel is reloaded at change, while the appropriate application jar is running.

So, I "simply" launch the Eclipse or IntelliJ with JRebel plugin for IDE, launch the host in it with JRebel plugin for JVM, install applications in host, launching their jars again with JRebel plugin for JVM, and I happily see the lines of code connected with running jars and classes reloaded at change.

But... Reading JRebel https://zeroturnaround.com/software/jrebel/download/ , along the bottom of the page I can see servers and other applications supported by JRebel.

I understand the need of support for IDEs, for JRebel must connect the lines of the source code, as I see them in IDE with the byte code, running in JVM. OK.

But what does it mean - server or other app supported by JRebel? If any jar can be run in JVM using JRebel jar as a plugin, as they explain in FAQ, where is the need for some special support? In other words, in what sense an application can be unsupported? In yet other words, our plugin and applications are not supported?

Gangnus
  • 24,044
  • 16
  • 90
  • 149

1 Answers1

4

The core of JRebel enables classes to be reloaded so you see results as if you restarted the application. This includes accessing class info via reflection and other JDK tools that operate on class metadata.

As this hints, the main problem with only doing class reloading is that almost everything is caching intermediate results and computing some information only at the start of the application. Assuming a class or framework configuration file does not change at runtime is usually a good one.

For this reason, JRebel must provide additional integration to preserve the illusion of class reloading as most applications these days depend on a large number of libraries, application servers and frameworks. For example, a spring application would scan for components and do wiring of beans only on startup. A simple class reload isn't enough and the additional integration must therefore re-scan and re-wire beans if needed.

However there are also a lot of libraries that don't need additional support. The term supported means that a specific server or framework has the required integration and has integration tests running daily. If any library or framework is not listed, it means it's untested or requires no additional integration.

As a side note, JRebel works on compiled class files so an IDE doesn't need support aside from the debugger. Anyone can develop java with vim and use JRebel just fine for example.

Murka
  • 353
  • 4
  • 10
  • And I can configure the list of folders of classes that will be listened to, and their changes will result in reloading? So, for my application I can set everything needed and I don't need any "support"? – Gangnus Nov 20 '17 at 23:34
  • 1
    Exactly! Just configure the rebel.xml with paths for classes and reload. The best way to figure out whether your app needs any support is by trying it out with various reloads. If you do find a use-case where a reload will not provide the same output as an application restart, you can drop a line to support@zeroturnaround.com and we are more than happy to investigate and help in creating a custom plugin if needed. – Murka Nov 20 '17 at 23:41