|
From: Leif M. <le...@ta...> - 2004-11-19 02:33:42
|
Jindong Li wrote: > I'm just thinking...when Wrapper pings the JVM, if there's any issue > with the ping itself (for example, there isn't any socket available, > would that be considered JVM not responding as well? > The Wrapper process opens a port that will listen for a single client connection from localhost. It allocates the port dynamically so it is very unlikely that you will ever run into a problem where a port can not be allocated. When the JVM is launched, it is provided with a wrapper.key that it used to identify the JVM. On initialization, the WrapperManager class immediately opens up a socket back to the Wrapper process for backend communication. The key is used so that the Wrapper can verify that the correct JVM is connecting. The Socket will then stay open for the life of the JVM. Because it is a localhost socket, there is no reason that the socket would ever drop. Just in case however there is code to reestablish the connection, to my knowledge however it has never been needed. In response to your question. If a socket could not be established then yes, the JVM would fail to start up. But that would happen either before the JVM is launched, when the server port is being opened. Or immediately after the JVM is launched, when it opens up the backend socket. Once the JVM is up and running, you will not have any problems caused by the socket itself. Cheers, Leif |