Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Webapp redeploy in jboss-4.0.2 is not working

 
naresh pasnur
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Touching or changing content in the web.xml file of my webapp is not redeploying the webapp.
Can someone please help me with this issue ?

thanks in advance.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Operating System? Where are you changing the web.xml, in an IDE or directly in the deploy/.war directory? And why JBoss AS 4.0.2, which is a very ancient version?
 
naresh pasnur
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not in the IDE. It's on a linux server.
This is my folder structure:
jboss-4.0.5\server\default\deploy\mywebapp.war\WEB-INF\web.xml.
Restarting the server redeploys the webapp but I don't want to restart every time I make a change to the webapp.
Touching the webapp normally redeploys the webapp.
 
naresh pasnur
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is something related to Jboss class loading mechanism.
Does anyone know where does in the jboss server, the information regarding loading of the classes of the .war is specified ?
I have to restart jboss whenever I make changes to the classes of the webapp.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this (it's a little drastic, but beats a restart): remove the web app from the deploy directory, wait a few seconds for the app to be undeployed. Then move the app back in.

Usually, changing the timestamp on WEB-INF/web.xml is supposed to redeploy the app. But then classloading issues do tend to crop up.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to what Peter suggested, also make sure that you have hot deployment enabled on that server instance. The flags that control hot deployment in AS4 are in JBOSS_HOME/server/< servername>/conf/jboss-service.xml:


Make sure, ScanEnabled is true and the ScanPeriod is set to your expected value.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
naresh pasnur wrote:This is something related to Jboss class loading mechanism.
Does anyone know where does in the jboss server, the information regarding loading of the classes of the .war is specified ?
I have to restart jboss whenever I make changes to the classes of the webapp.


Oops, I actually missed this post of yours. What exactly is the problem with classloading? By the way, you haven't answered why you are using JBoss AS 4.0.x.

 
naresh pasnur
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for your responses.
The hot deployment is enabled on that server instance and that is ruled out.
The reason why I'm using Jboss4.0.2 and not recent versions because upgrading it involves too much complications.
I work for a company and they have many websites hosted on this server. They have to keep their websites up and running 24/7.
I haven't tried with Peter's suggestion yet but will do it tonight when the traffic is less.
What's is the sequence of steps when a timestamp on web.xml is changed ?

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic