jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hollamby, Robert" <Robert.Holla...@cbr.defence.gov.au>
Subject Sec:Unclassified Ant fails on Weblogic 6.0 shutdown
Date Mon, 29 Oct 2001 20:57:28 GMT
Hi Jef

The following script works for me.

    <!-- 
 
========================================================================
         Run WebLogic 6.0sp2 tests
 
========================================================================
    -->
    <target name="tests_weblogic_60sp2"
depends="prepare_tests_weblogic_60sp2" 
        if="weblogic.home.60sp2">

        <!-- Start the servlet engine, wait for it to be started, run the
             unit tests, stop the servlet engine, wait for it to be stopped.
             The servlet engine is stopped if the tests fail for any reason
-->

        <runservertests 
            testURL="http://${host}:${port}/${webapp.name}/test"
            startTarget="start_weblogic_60sp2"
            stopTarget="stop_weblogic_60sp2"
            testTarget="tests"/>

    </target>

    <!-- 
 
========================================================================
         Start WebLogic 6.0sp2
 
========================================================================
    -->
    <target name="start_weblogic_60sp2">

        <java classname="weblogic.Server" fork="yes"
dir="${weblogic.home.60sp2}">

            <classpath>
              <pathelement location="${wls60sp2.jar}"/>
              
            </classpath>

            <jvmarg value="-ms64m"/>
            <jvmarg value="-mx64m"/>
            <jvmarg value="-Dweblogic.Domain=${wls60sp2.domain}"/>
            <jvmarg value="-Dweblogic.Name=${wls60sp2.server}"/>
            <jvmarg value="-Dweblogic.ListenPort=${port}"/>
            <jvmarg value="-Dweblogic.NativeIOEnabled=False"/>
            
            <jvmarg value="-Dbea.home=${bea.home}"/>
            <jvmarg
value="-Djava.security.policy==${wls60sp2.security.policy}"/>
            <jvmarg value="-Dweblogic.management.password=${password}"/>

        </java>

    </target>

    <!-- 
 
========================================================================
         Stop WebLogic 6.0
 
========================================================================
    -->
    <target name="stop_weblogic_60sp2">

        <java classname="weblogic.Admin" fork="yes"
dir="${weblogic.home.60sp2}">

            <classpath>
	        <pathelement location="${wls60sp2.jar}"/>
            </classpath>

            <arg value="-url"/>
            <arg value="t3://${host}:${port}"/>
            <arg value="SHUTDOWN"/>
            <arg value="-username"/>
            <arg value="${user}"/>
            <arg value="-password"/>
            <arg value="${password}"/>

        </java>

    </target>

    <!-- 
 
========================================================================
         Display a warning message if the needed servlet engine home
property
         is not set
 
========================================================================
    -->
    <target name="check_tests_weblogic_60sp2" unless="weblogic.home.60sp2">

        <echo message=""/>
        <echo
message="***********************************************************"/>
        <echo message="WARNING : The 'weblogic.home.60sp2' property has not
been set."/>
        <echo message="          No test will be run on that servlet
engine."/>
        <echo
message="***********************************************************"/>
        <echo message=""/>

    </target>

    <!-- 
 
========================================================================
         Prepare directories and variables for running the tests
 
========================================================================
    -->
    <target name="prepare_tests_weblogic_60sp2"
depends="check_tests_weblogic_60sp2" 
        if="weblogic.home.60sp2">

        <echo message="weblogic.home.60sp2 = ${weblogic.home.60sp2}"/>
        <!-- Set up properties for war directory locations -->
	<property name="wls60sp2.jar"
value="${weblogic.home.60sp2}/lib/weblogic.jar"/>
	<property name="wls60sp2.domain" value="mydomain"/>
	<property name="wls60sp2.server" value="myserver"/>
	<property name="bea.home" value="D:/bea/"/>
	<property name="wls60sp2.security.policy" 
	    value="${weblogic.home.60sp2}/lib/weblogic.policy"/>
	<property name="wls60sp2.war.deploy" 
	
value="${weblogic.home.60sp2}/config/mydomain/applications/${webapp.name}.wa
r"/>
	<property name="wls60sp2.ejb.deploy" 
	
value="${weblogic.home.60sp2}/config/mydomain/applications/wls60sp2_ejb_test
.jar"/>
	
        

        <!-- Copy the ejb/war file -->
        <copy file="${wl60sp2.war.output}"
            tofile="${wls60sp2.war.deploy}"/>

        <copy file="${wl60sp2.ejb.output}"
            tofile="${wls60sp2.ejb.deploy}"/>
        

    </target>

Robert Hollamby

ph: +61 2 6266 2265
fax: +61 2 6266 4647

Defence Information Systems
Campbell Park Offices
Canberra ACT 2600
Australia




--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message