Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>even we faced this problem of auto deployment script taking longer time in our organization. So initially we had our script running in sequential like cleaning, stopping tomcats, updating, starting tomcats and making sure that all webapps are properly deployed.</p> <p>So we have done following things like: 1. parallely cleaning and stopping all tomcats 2. do svn swith 3. parallely start all tomcats 4. make sure all webapps are deployed properly using jmx</p> <p>here is the piece of code :</p> <pre><code> &lt;target name="all_clean_parallel"&gt; &lt;parallel&gt; &lt;antcall target="x1_clean"/&gt; &lt;antcall target="x2_clean"/&gt; &lt;antcall target="x3_clean"/&gt; &lt;/parallel&gt; &lt;/target&gt; &lt;target name="all_start_parallel"&gt; &lt;parallel&gt; &lt;antcall target="x1_start"/&gt; &lt;antcall target="x2_start"/&gt; &lt;antcall target="x3_start"/&gt; &lt;/parallel&gt; &lt;/target&gt; </code></pre> <p>And the piece of code to check whether webapp is deployed propely or not with jmx help :</p> <pre><code> &lt;macrodef name="mStatus"&gt; &lt;attribute name="aModule" /&gt; &lt;attribute name="aHost" default="localhost"/&gt; &lt;attribute name="aPort" default="9012"/&gt; &lt;attribute name="aMaxWait" default="240"/&gt; &lt;attribute name="aTomcat" default=""/&gt; &lt;attribute name="aState" default="1"/&gt; &lt;sequential&gt; &lt;waitfor maxwait="@{aMaxWait}" maxwaitunit="second" timeoutproperty="@{aHost}.@{aTomcat}.@{aModule}.@{aPort}.server.timeout" &gt; &lt;and&gt; &lt;jmx:equals host="@{aHost}" port="@{aPort}" ref="@{aHost}.@{aTomcat}.@{aModule}.@{aPort}" name="Catalina:j2eeType=WebModule,name=//localhost/@{aModule},J2EEApplication=none,J2EEServer=none" attribute="state" value="@{aState}" /&gt; &lt;/and&gt; &lt;/waitfor&gt; &lt;if&gt; &lt;equals arg1="${@{aHost}.@{aTomcat}.@{aModule}.@{aPort}.server.timeout}" arg2="true" /&gt; &lt;then&gt; &lt;var name="failBuild" value="true"/&gt; &lt;echo message="*************************Host.Tomcat.Module = @{aHost}.@{aTomcat}.@{aModule} is not deployed into the tomcat" /&gt; &lt;/then&gt; &lt;else&gt; &lt;echo message="@{aHost}.@{aModule} is deployed into the tomcat" /&gt; &lt;/else&gt; &lt;/if&gt; &lt;/sequential&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload