Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enable hot code replace function in Jboss

 
Mahesh Srinivas
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
akshay gehi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic