Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to hot redeploy an app to JBoss?

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using JBoss 5.1 on Mac 10.5.6 (Java 1.6). Right now, I'm using Maven 2.2 as my biuld tool. Does anyone know how to hot-redeploy an app without having to restart the server? I'm noticing that whenever I make a change to my WAR file, install and deploy using

mvn install jboss:deploy

I'm having to restart my JBoss server in order to see those changes. I was hoping someone could suggest a more efficient workflow.

Thanks, - Dave
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JBoss AS, by default, hot deploys applications. By default, it scans the deploy directory every 5 seconds to see if an app was updated, and if so, redeploys it. By "if an app was updated" I mean either:

a) the app is packaged and deployed an an archive file and the archive file's timestamp changed

b) the app is packaged and deployed as an exploded directory, and the key configuration file (web.xml for war, application.xml for ear) has it's timestamp changed.

I have no idea what Maven does with the "jboss:deploy" directive. If there are no responses here, I might move this question to the Maven forum. (Please do not repost this question in that forum.)
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is this "5 seconds" setting ?
If i want to change it to 30 seconds for instance, which file holds that information ?

Thanks

EDIT:
cannot find this info in jboss-5.1.0.GA.jdk6\server\default\conf\bootstrap\profile.xml and jboss-5.1.0.GA.jdk6\server\default\conf\bootstrap\deployers

Peter Johnson wrote:JBoss AS, by default, hot deploys applications. By default, it scans the deploy directory every 5 seconds to see if an app was updated, and if so, redeploys it. By "if an app was updated" I mean either:

a) the app is packaged and deployed an an archive file and the archive file's timestamp changed

b) the app is packaged and deployed as an exploded directory, and the key configuration file (web.xml for war, application.xml for ear) has it's timestamp changed.

I have no idea what Maven does with the "jboss:deploy" directive. If there are no responses here, I might move this question to the Maven forum. (Please do not repost this question in that forum.)
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In 5.1.0.GA, this setting (scanPeriod) was move tho the HDScanner bean in server/xxx/deploy/hdscanner-jboss-beans.xml. (Yes, keeping up with "configuration settings' musical chairs" is almost a full-time job.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic