Gangnus
Gangnus

Reputation: 24474

What does the support of JRebel for an app (non-IDE) mean?

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?

Upvotes: 1

Views: 227

Answers (1)

Murka
Murka

Reputation: 361

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.

Upvotes: 4

Related Questions