-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Francis,

On 3/19/2011 5:49 AM, Francis GALIEGUE wrote:
> On Fri, Mar 18, 2011 at 22:45, Christopher Schultz
> <ch...@christopherschultz.net> wrote:
> [...]
>>
>> I'm interested to see how you are able to launch Tomcat and have your
>> script continue only after all webapps have been deployed.
>>
> 
> This is the code right now:
>
> [snip]
>

Why not just run this part after calling catalina.sh?

>         MAXITERS=120
>         ITERS=0
> 
>         while true; do
>                 ITERS=$((ITERS+1))
>                 if [ $ITERS -gt $MAXITERS ]; then
>                         echo
>                         echo >&2 "BUG: Tomcat not started after
> $MAXITERS seconds!"
>                         exit 1
>                 fi
> 
>                 perl -ne "print if /^$STAMP$/ .. eof()" "$LOGFILE" | \
>                         egrep -q "^INFO: Server startup in [0-9]+ ms$"
> 
>                 RC=$?
> 
>                 if [ "$RC" = "0" ]; then
>                         break
>                 fi
>                 echo -n .
>                 sleep 1
>         done
> 
>         echo " Done (in $ITERS seconds)"

That's the only part that Tomcat's scripts doesn't handle on its own.

> It is with this script that I noticed the long deploying time of
> /manager. This is the only way I knew of until yesterday, when I
> noticed that the shutdown port only gets open after webapps are
> deployed. I'll switch to this technique (using netstat -ltn|grep -w
> $SHUTDOWN_PORT or something like that) since it is more reliable (and
> faster) than scanning the log file: the server startup message may
> change behind me... Ideally, of course, it'd be very nice if the
> BootStrap class had, said, a "fullstart" command: I wouldn't need any
> of these ;)

Really? How would you launch a process in the foreground and then have
it go into the background to resume your script?

I'm just trying to save you some of your own time. I'm not going to
argue with you about it :)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2HX2wACgkQ9CaO5/Lv0PCnFwCeIt9nFI3i/D/DWTzwtKP8WjDJ
/3QAnReSCyf2XnPwZYdVvGCML8L5L7Xx
=CMw1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to