Hi,

I have a very strange phenomenon:
When I do a hot deployment of my application via war file, my application
disappears sometimes!
I'm using Tomcat 5.5.7 on Sun Solaris 7.
I post you my ant script, which I'm using.
As you can image, this is not very nice in a production environment. I try
to fix it by first stopping the application and then copying the war file
accross, but it's still the same.
You see some backup stuff in the antscript, maybe that's what's causing it,
but we need it, so the only solution, which I see is to stop and start
Tomcat, but that's not really acceptable in a 24xt environment.

        <target name="deploy">
                <!-- build number -->
                <buildnumber file="${backup}/${webappname}.number"/>
                <!-- copy the warfile to the backup directory -->
                <copy file="${wars}/live/${webappname}.war"
tofile="${backup}/${webappname}_${build.number}.jar"/>
                <!--  copy the remote file to the backup directory  --> 
                <scp
file="${adminremoteuser}:[EMAIL PROTECTED]:${remotedir}${w
ebappname}.war" todir="${backup}" trust="yes" /> 
                <!--  rename it to .backup --> 
                <move file="${backup}/${webappname}.war"
tofile="${backup}/${webappname}.backup.war" /> 
                <!--  do (another) backup of the file from the live server
--> 
                <copy file="${backup}/${webappname}.backup.war"
tofile="${backup}/${webappname}_${build.number}.backup.war" /> 
                <!-- stop the application --> 
              <stop url="http://${adminremotehost}/manager";
username="${managerusername}" password="${managerpassword}"
                    path="/${webappname}"/>
                <!--  finally copy the war file to the remote server --> 
                <scp file="${wars}/live/${webappname}.war"
todir="${adminremoteuser}:[EMAIL PROTECTED]:${remotedir}"
trust="yes" /> 
        </target>

Thanks for your help!

Bernhard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to