aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Enable hot code replace function in Jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Enable hot code replace function in Jboss" Watch "Enable hot code replace function in Jboss" New topic
Author

Enable hot code replace function in Jboss

Mahesh Srinivas
Greenhorn

Joined: Nov 22, 2008
Posts: 6
Hi,
Can anyone suggest how to enable hot code replace in Jboss so that if i remote debug through IDE like Eclipse and make code changes, i dont need to restart the server?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Hot deployment is already a JBoss AS capability - overwrite an existing WAR file, for example, and the app is redeployed. The hot deployer scans the deploy directory every 5 seconds looking for changes. You can, of course, turn the hot deployer off and/or change the frequency at which it scan the deploy directory.

If you have an exploded deployment (a *.war directory rather than a *.war file, for example), then updating the key configuration files (web.xml fior WAR, application.xml file for EAR, for example) will cause the hot deployer to redeploy the app.

Doing this via Eclipse so that you can debug the app? Which I imagine involves Eclipse releasing the current set of classes for your app and then latching onto the updated ones so that you can continue debugging. Haven't the fainest idea. I'll leave it up to Jaikiran as to whether this topic should be moved to the IDE forum.


JBoss In Action
akshay gehi
Greenhorn

Joined: Jul 19, 2007
Posts: 5
I think he meant code swap not hot deploy. Start JBoss in debug mode from eclipse and make sure build automatically is enabled that is it. It works well with JDK 1.5.0_17


SCJP 1.5
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

Peter Johnson wrote:
Doing this via Eclipse so that you can debug the app? Which I imagine involves Eclipse releasing the current set of classes for your app and then latching onto the updated ones so that you can continue debugging. Haven't the fainest idea.


I have heard that IDEs have the ability to swap the code when being run in debug mode. I personally haven't tried this with any of the IDEs for various reasons.

Start JBoss in debug mode from eclipse and make sure build automatically is enabled that is it.


This however, isn't a application server specific thing, but more of a IDE thing, so i guess the IDE forum is a good place for this.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enable hot code replace function in Jboss