I’m writing a C# application to control the windows tomcat service. I need a way to get some sort of event when tomcat finishes starting after I run the service. (i.e. all the apps deploy.)
I can read the log file and wait for the “Server startup in” message but it seems like there must be a less messy way. I know you can register a lifecycle listener using Java but I can’t think of a way to do something similar with C#.
Does anyone know a good way to monitor tomcat with C#? Thanks in advance.
Edit: In case I wasn’t clear, simply checking the status of the isn’t sufficient since it will report “Running” during the startup time while the apps are being deployed and it isn’t yet accessible.
I ended up writing a tomcat wrapper in Java which acts as a lifecycle listener. The C# application launches the java program and receives lifecycle messages through a named pipe.