ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Martin <patrick.mar...@sungard.com>
Subject RE: <java fork="true"> does not detect process termination
Date Mon, 23 Aug 2004 15:40:19 GMT
Hi,

Thanks for the answer.
I actually want ant to wait for the end of the process. We do use the
console output. The problem is that ant won't stop when the started process
stops.

Patrick

>  -----Original Message-----
> From: 	"Mark Lybarger" <Mark.Lybarger@CBC-Companies.com>@SUNGARD  
> Sent:	lundi 23 août 2004 17:42
> To:	Ant Users List
> Subject:	RE: <java fork="true"> does not detect process termination
> 
> 
> 	<java jvm="java" classname="weblogic.Server" spawn="true"
> fork="true" dir="${DOMAIN_DIR}">
> 
> If you want the ant script to return from starting the weblogic server,
> you might want to try out the spawn attribute of the java ant task.  this
> sends the process off to run on its own.  we use this to start our wls
> servers. one minor problem that we have is that if the servers don't
> start, we can't easily see why they didn't start.  we haven't found a way
> to see the spawned processes output.  we use the spawn for both admin and
> managed servers.
> 
> 
> > -----Original Message-----
> > From: Patrick Martin [mailto:patrick.martin@sungard.com
> <mailto:patrick.martin@sungard.com> ]
> > Sent: Monday, August 23, 2004 10:59 AM
> > To: Ant Users List
> > Subject: <java fork="true"> does not detect process termination
> >
> >
> > 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.
> >
> 
> 
> 
> 
> 
Confidentiality Notice: The information contained in this e-mail message is
intended only for the personal and confidential use of the recipient(s)
named above. If the reader of this message is not the intended recipient or
an agent responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is strictly
prohibited. If you have received this communication in error, please notify
us immediately by e-mail, and delete the original message. 

Message confidentiel : Les informations contenues dans ce message sont
destinées à un usage personnel et confidentiel du destinataire indiqué
ci-dessus. Si le lecteur de ce message n'est pas le destinataire prévu, ou
n'est pas une personne en charge de le délivrer au destinataire voulu, vous
êtes par la présente informé que vous avez reçu ce document par erreur, et
que tout examen, transmission, distribution ou copie de ce message est
totalement interdit. Si vous avez reçu cette communication par erreur, nous
vous remercions de bien vouloir nous avertir immédiatement par e-mail et de
détruire le message d'origine.


Mime
View raw message