[launchd-dev] Re: process dependancies
Dave Zarzycki
zarzycki at apple.com
Mon Mar 12 19:47:57 PDT 2007
On Mar 12, 2007, at 3:26 AM, Joël Brogniart wrote:
> So, if I understood, lets me give an example.
>
> I have a java web application that run with Tomcat. This java app
> respond on port 10001 with protocol AJP 1.3 and on port 10002 with
> protocol http.
> I have an Apache server that connect to the web application with
> mod_jk (with protocol AJP).
>
> In order to have Apache to wait until the web application is ready I
> have to include a "Sockets" and a "inetdCompatibility " keys in the
> web application launchd.plist:
>
> <key>ProgramArguments</key>
> <array>
> <string>/Library/Java/Home/bin/java</string>
> <string>-server</string>
> ...
> <string>org.apache.catalina.startup.Bootstrap</string>
> <string>start</string>
> </array>
> <key>RunAtLoad</key>
> <true/>
> ...
> <key>Sockets</key>
> <dict>
> <key>Listeners</key>
> <dict>
> <key>SockNodeName</key>
> <string>192.168.128.16</string>
> <key>SockServiceName</key>
> <array>
> <integer>10001</integer>
> <integer>10002</integer>
> </array>
> </dict>
> </dict>
> <key>inetdCompatibility</key>
> <dict>
> <key>Wait</key>
> <false/>
> </dict>
> ...
>
> (mod_jk will likely fail with a timeout error due to the duration of
> the web application's initialisation but that's another topic). Is
> that right?
Is is right? Definitely not. Use of the "Sockets" key generally
involves changes in the target program. In this case, the Java runtime
engine and THEN your Java code. I have yet to see a Java runtime
engine modified to be launchd aware.
Sorry,
davez
More information about the launchd-dev
mailing list