2 Replies Latest reply on Apr 19, 2007 3:30 PM by John Smith

    How to don't redeploy ear after restart JBoss server

    Jaroslav Havelka Newbie


      can you help me? I deploy the ear to JBoss server and it is running. Then restart JBoss server and this application is deployed again. So I can not see e.g. log files of my application, because it was deleted.

      Is possible to say JBoss "don't redeploy this application, if it is deployed, when JBoss is restarted".

      Thanks for help.

        • 2. Re: How to don't redeploy ear after restart JBoss server
          John Smith Newbie

          Instead of trying not redeploying the ear after restarting JBoss server, you could try jboss not cleaning your log files after restarting.

          By default, every time you restart jboss log4j clean all the logs. In order to avoid this behaviour you have to modify the log4j configuration file($JBOSS_HOME/default/conf/log4j.xml):

          Look for the appender used by your application and and set the Append param in your appender to true. it should then look more or less like this:

          <appender name="myapplication" class="org.apache.log4j.FileAppender">
          <param name="File" value="${jboss.server.home.dir}/log/myapplication.log" />
          <param name="Append" value="true" />
          <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%d{dd MMM yyy HH:mm:ss}, %-6p %C:%M:%L %m %n" />

          Finally, store (if possible) your application log files out of your application folder/file, for example in $JBOSS_HOME/server/default/log/myapplication.log. In this way you avoid to delete your application logs when you deploy a new version.