1 Reply Latest reply on Sep 8, 2008 11:36 AM by Peter Johnson

    deployment problems when i replace the war file

    just chill Newbie

      Hello Peter,

      I am facing problem with the deployment in jboss.v4.2
      I am trying to stop the server and replace the old war file with latest war file and then start the server.
      I am getting strange problems and it is not showing the home page of the application itself giving error 404 not found.
      When I checke din jboss forums I found the following url where you explained about the hot deployment.

      Could you please explain little elaborate on how do I do this process.
      And why should I follow this process.
      I mean what is hotdeployment and I need to follow the hotdeployment in production env.

      Thanks And Regards,

        • 1. Re: deployment problems when i replace the war file
          Peter Johnson Master

          I scanned the docs for a description of hot deployment but this was all I found:
          So here is a more detailed explanation.

          Every 5 seconds (by default, you can adjust this), a thread within the app server wakes up and scans the deploy directory looking for changes. It looks mainly at application archive files (for example EAR and WAR files) or primary configuration files within exploded application directories (for example, the WEB-INF/web.xml file within an xxx.war directory). If the file has been updated (the current modification timestamp is more recent that what it was the last time the hot deployer thread ran), then the hot deployer thread will undeploy the application and deploy it again.

          The primary purpose is so that you can deploy an update to an application without having to bring the server down and back up; which is a big help in a development environment.

          In a production environment it has some unwanted side-effects. First, any existing sessions are invalidated which means that any users in the middle of doing something will have to start over again. Second, hot deployment tends to not clean up the old classes from the prior versions of the app. Thus after several hot deployments you will find yourself running out of room in the permgen and experiencing out-of-memory error. Third, if there are no updated applications, the hot deployment thread runs for no good reasons and causes a slight performance slowdown. For these reasons, I always recommend turning hot deployment off in a production environment.

          Having said all that, there is nothing magical about hot deployment that will solve the 404 error.