ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: <java fork="true"> does not detect process termination
Date Mon, 23 Aug 2004 16:10:47 GMT
Hello Patrick,
this class weblogic.Admin should be able to finish when the weblogic server
is stopped.

As a workaround you may add the attribute spawn="true" to your <java> tag.
Then ant will not wait on the java process to return

Antoine

> Hi,
> 
> I start a weblogic managed server with the following target:
> 
> <target name="startwlm" if="server.name" depends="init-wl">
>   <java classname="weblogic.Server" fork="yes"
> dir="${applications.dir}/.."
> >
>     <sysproperty key="java.library.path" path="${weblogic.home}/bin"/>
>     <classpath refid="weblogic.class.path"/>
>     <jvmarg line="${weblogic.jvm.args}"/> 
>     <jvmarg value="-Dbea.home=${bea.home}"/> 
>     <jvmarg value="-Dweblogic.Domain=${weblogic.domain.name}"/> 
>     <jvmarg value="-Dweblogic.Name=${server.name}"/> 
>     <jvmarg
> value="-Dweblogic.management.username=${weblogic.server.username}"/> 
>     <jvmarg
> value="-Dweblogic.management.password=${weblogic.server.password}"/> 
>     <jvmarg
>
value="-Dweblogic.management.server=${weblogic.server.host}:${weblogic.serve
> r.port}"/> 
>     <jvmarg value="-Ddomain.dir=${weblogic.domain.dir}"/>
>     <jvmarg
> value="-Djava.security.policy=${weblogic.home}/lib/weblogic.policy"/> 
>   </java>
> </target>
> 
> In order to shutdown this process, I call an other target like this:
> 
> <target name="stopwlm" if="server.name" depends="init">
>   <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> 
>   <propertycopy name="port" from="${server.name}.port"/>
>   <java classname="weblogic.Admin" fork="yes"
> dir="${applications.dir}/..">
>     <sysproperty key="java.library.path" path="${weblogic.home}/bin"/>
>     <classpath location="${weblogic.home}/lib/weblogic.jar"/>
>     <arg line="-url ${weblogic.server.host}:${port}"/> 
>     <arg line="-username ${weblogic.server.username}"/> 
>     <arg line="-password ${weblogic.server.password}"/> 
>     <arg value="SHUTDOWN"/> 
>   </java>
> </target>
> 
> The weblogic server instance shuts down correctly (the process ID
> disappears) but the ant process that ran startwlm does not return and
> continues waiting. This problem exists in ant 1.5.3 and 1.6.2.
> 
> I do the same thing with the admin server and it works fine.
> 
> Does anyone have an idea of what I am doing wrong here?
> 
> Thanks in advance,
> 
> Patrick.
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message