ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Gimler <sh...@ll.mit.edu>
Subject RE: separate jvms
Date Mon, 07 Jun 2004 18:04:11 GMT
When the JVM exits from an ant task like the following...

<parallel>
   <daemons>
     ...
   </daemons>
</parallel>

Will the shutdown hooks be called for the JVMs inside of daemons when ant 
exits?  If not, is there
another way to force it?  Thanks.

                                         -Greg



At 08:02 PM 6/4/2004, Dominique Devienne wrote:
> > From: Gregory Gimler [mailto:shark@ll.mit.edu]
> >
> > I have a question about starting up java processes on separate JVMs.  I
> > have some unit tests that require certain services to be up and running
> > before testing.  I thought the <java fork="yes"> option would have done
> > the
> > trick but what happens is it runs my daemon and stops there and doesn't
> > execute any more ant tasks until I CTRL-C the daemon.  So I did the
> > spawn="yes" option and that did the trick.  The daemon started up, my unit
> > tests then ran, and the build finished successfully.  However, then I
> > still
> > had the daemon running in the background (something I don't want).  Is
> > this
> > a bug or is there another way to do this with fork?  Thanks.
>
>This is all by design. Spawn="yes" is intended for starting processes
>that should outlive the Ant VM.
>
>What you want is probably <parallel>. Never used it myself, so I don't
>have specific example, but there should be some in the archive. I believe
>the trick is to have a way to delay the Unit tests until all servers
>are started, using something like <waitfor> for example. --DD
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org



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


Mime
View raw message