简体   繁体   中英

Hot Deploy on remote server with Netbeans

My maven project is configured to run on a local glassfish server. When I make any change on a Java class or a JSP file, it get automatically deployed.

However, if I configure the same project to run on a remote server, it does not automatically deploy anything when I hit the save button, I have to manually hit the "Run" button.

Is there anything I'm doing wrong ?

Thanks !

No this it the way it is.

Hot-Code replacement works within an IDE because it can control the java process and the class loading. Once on a remote machine the process can no longer be controlled by your IDE.

Depending on the frameworks you are using (Spring, JPA, ...) even hot-code replacement might not have the intended effect as these frameworks need to initialize during startup.

The JDK itself only supports some sort of changes. Often signature changes will not reload or adding static methods.

If you need a better hot-code reloading support you may try JRebel . It a commercial tool but it supports more variations of reloading and also has some framework support.

I've read about companies using it on production servers as well.

Related to maven you only need to notice that if maven deploys the .war or .ear file it's also not under control of your IDE (or with even stronger limitations). It's usually the best way to let the IDE do the work locally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM