Re: Running applications using Ant tasks

<depstein-6g8wRflRTwWrN/MWgto1swC/[email protected]> Wed, 22 Sep 2010 19:51:10 +0400
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <29F36C7C98AB09499B1A209D48EAA615B4EBB2DE6A@mail2a.alliedtesting.com>
> -----Original Message-----
> From: Steve Loughran [mailto:[email protected]]
> Sent: Wednesday, September 22, 2010 7:29 PM
> 
>  > As for the ant tasks, my problem with<sf-run>  is that although the
> description suggests that the task waits for the application to
> terminate, in reality it only waits for deployment/start, and then
> shuts
> down the daemon. Therefore, if the application lifecycle extends beyond
> sfStart (as in the 'counter' example, for instance), then<sf-run>
> terminates it prematurely.
> 
> I'll have to look at that because it shouldn't happen, I know I've run
> things as parts of builds (e.g. deploy something to create properties
> files), but it may just be I've been running targets by hand and not
> noticing the race condition

I also didn't notice that until I tried to run something that took more than a second or so to complete. But I'm pretty sure that sf-run does not wait for the application to terminate: it runs the daemon with the -e option and doesn't seem to include any blocking loops.

Anyway, I am now using testharness and I am loving it :) Works much better than Ant tasks, which, among other inconveniences, execute every task or sub-task in a separate process, ignoring any spawn and allowspawning flags.

Dmitry

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev