简体   繁体   中英

Is there any other way to do a Hotswap without using Java IDE?

The Application is Running on Tomcat Server using java.I dont want to stop the Server everytime there is a Java change. The build System is heavily reliant on Shell Scripts, so i cannot use any Java IDE to do normal HotSwap.

Now, Is there any otherway i can Hot swap the file?

I have used JRebel for this purpose on several java projects. It can reduce redeploy times considerable.

One way would be to use the Tomcat Management Web User Interface. You can easily script commands to the WebUI using curl .

There are also Ant tasks for Tomcat management operations.

Reference:

Examples:

If you are looking for some kind of graceful update of your applications, you can take a look at Tomcat's Parallel deployment . With that option, you can update application without stopping current open sessions. The server will start new sessions on the new application versions while older one wont be renewed on the older.

What you are looking for is a Development Mode which allows you to swap the Application at runtime with a new version. This is usually useful for development while not practiced in the production, hence it is called "development mode".

See How to Install Apache Tomcat for Development Mode .

More on this also in Restart tomcat when a class file is changed? .

See the Documentation , search for reloadable:

reloadable
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development , but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

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