Which Java web frameworks provide hot-reload?
Asked Answered
L

8

12

I'd like to know which Java web application frameworks provides a "hot reload" capability, i.e., it allows to develop applications and has them redeployed on the server "almost instantly" (i.e., in less than a few seconds).

In the Java world, Play! does that out of the box, but what I'm looking for is a more exhaustive list.

Other examples that I'm aware of include: Nuxeo WebEngine, provided you're using Eclipse and the right plugin, or, in the Python world, Django and Pylons (when using the --reload option).

Lethe answered 16/5, 2010 at 14:36 Comment(0)
A
13

If someone might be interested after those months:

you can configure jetty so that it will hot deploy your compiled classes (eclipse + netbeans have the compile on save feature). With maven you can type mvn jetty:run after this config in your pom.xml:

        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>${jetty.version}</version>
            <configuration>
                <scanTargets>
                    <scanTarget>target/classes/</scanTarget>
                </scanTargets>
                <scanIntervalSeconds>1</scanIntervalSeconds>
            </configuration>
        </plugin>

This can be done without the use of jrebel and it means: do a change in the IDE + save it + go to your browser + F5 => you are done!

With that feature e.g. wicket or vaadin are hot deployable (but others too!)

Adiabatic answered 8/9, 2010 at 13:26 Comment(0)
Z
15

As far as I know, you can do hot reload with almost every java framework if using jrebel. Some frameworks have some kind of hot-deploy built in, as noted in other answers.

Zenobiazeolite answered 16/5, 2010 at 14:44 Comment(0)
A
13

If someone might be interested after those months:

you can configure jetty so that it will hot deploy your compiled classes (eclipse + netbeans have the compile on save feature). With maven you can type mvn jetty:run after this config in your pom.xml:

        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>${jetty.version}</version>
            <configuration>
                <scanTargets>
                    <scanTarget>target/classes/</scanTarget>
                </scanTargets>
                <scanIntervalSeconds>1</scanIntervalSeconds>
            </configuration>
        </plugin>

This can be done without the use of jrebel and it means: do a change in the IDE + save it + go to your browser + F5 => you are done!

With that feature e.g. wicket or vaadin are hot deployable (but others too!)

Adiabatic answered 8/9, 2010 at 13:26 Comment(0)
M
2

Tapestry 5 has hot deploy of single class/page changes, as does Seam.

Miguelmiguela answered 16/5, 2010 at 14:41 Comment(0)
H
1

I'm going to assume you want this for development purposes and not for production (as hot-reloading in production for Java == big time fail). Very rarely will I shill a commercial product, but if you want hot-reloading in Java to speed up development, what you really want is JRebel. It's hot reloading will be fairly effortless on your part.

NOTE: Whatever you do, do not use JRebel (or any hot deployment, for that matter) for your Java apps.

Hemipterous answered 8/9, 2010 at 13:40 Comment(1)
Which definition of hot reload is bad? [ 1. Reloading an app without restarting the entire server (which may contain multiple apps). 2. Automatically performing #1 when the files change. ] Sure, you can do without #2 in production, but you might need #1Electret
I
0

If you use POJOs, instead of EJBs, Seam framework should be in your list.

Incorruptible answered 16/5, 2010 at 14:39 Comment(0)
E
0

If you want to edit your Java (controller, model) code and refresh your browser to see changes immediately and without restarting your web server, you can use scooter. By the way, its built-in tool File Browser allows you to edit(compile) your code thru a browser. A browser may not be capable as an IDE, but it helps you remotely develop your app.

Extravert answered 12/12, 2010 at 16:10 Comment(0)
D
0

There's a new kid on the block, RelProxy, it is open source, is not so advanced like JRebel but it can be used to freely change a subset of your code in runtime and reload it with almost no performance penalty and no need of context reloading (no session lost) in development and production if you want.

Dudleyduds answered 2/2, 2015 at 12:24 Comment(0)
I
-1

When developing a struts(2) application in eclipse it's also automatically reloaded as soon as you save a file which compiles successfully.

However, sessions are lost on every reload which is a bit annoying..

Instruction answered 16/5, 2010 at 14:39 Comment(1)
That's just an automatic redeploy of the application in the application server that is triggered by the IDE.Dysfunction

© 2022 - 2024 — McMap. All rights reserved.