W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 2003

Shutting down Jigsaw server without JigAdmin

From: Wayne Johnson <wjohnson@mqsoftware.com>
Date: Fri, 3 Jan 2003 13:45:42 -0600
Message-ID: <A14F6A96A4696D468FBF4256637CBAA824B51A@MAILSERVERMN.mqsoftware.com>
To: <www-jigsaw@w3.org>

We are using a somewhat stripped down version of Jigsaw that does not run the  jigadmin (8009) port for security and other reasons.  This server runs in a JNI environment.  We need to shutdown the Jigsaw Server before shutting down the JVM, but without a JigAdmin, we can't use JigKill.  

After digging through the Jigsaw code for a couple of hours this is what I've found.  First, how we're suppose to shutdown Jigsaw.  Jigsaw has a script that calls the java program JigKill.  This JigKill program sends an HTTP (I think) request to the Admin server on port 8009.  This Admin server is then able to shutdown the whole Jigsaw stack.  

When Jigsaw starts, it's main function calls the ServerHandlerManager (aka shm).  This method reads a list of servers from the server.props configuration file.  It then dynamically instanciates each of these servers (httpd and admin) and calls the service's initialize() methods (passing in a reference to the shm) and continues on it's merry way.  When the Admin server receives the kill command from JigKill, it gets the shm reference that was passed it, and calls the shm shutdown method, which in turn shuts down all the services.

The problem here, it that the shm nor any of the servers have any public globals that we can grab through the JNI.  

I propose to write a very stripped down Jigsaw server that:
1) in the initialization method, saves the reference to the shm in a class global,
2) modify server.props to start our service,
3) has a public static method that takes this shm reference and calls its shutdown method,
4) Modify our JNI code to call this public static method at shutdown.

Anyone got any better ideas?

Received on Friday, 3 January 2003 14:45:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:30 UTC