Re: Shutting down Jigsaw server without JigAdmin
Yves Lafon <[email protected]> Sat, 4 Jan 2003 00:37:02 +0100 (MET)
| Newsgroups | gmane.comp.web.jigsaw |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 3 Jan 2003, Wayne Johnson wrote: > > 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 Serve= r > before shutting down the JVM, but without a JigAdmin, we can't use > JigKill. > I propose to write a very stripped down Jigsaw server that: > 1) in the initialization method, saves the reference to the shm in a cl= ass global, > 2) modify server.props to start our service, > 3) has a public static method that takes this shm reference and calls i= ts shutdown method, > 4) Modify our JNI code to call this public static method at shutdown. jdk1.3 an onward has the possibility to catch some signals, using the shutdown hook [1]. If your JNI code is able to send such signal to the jv= m process, then Jigsaw will save its configuration and exit. Is it enough for your need? Regards, [1] http://java.sun.com/j2se/1.3/docs/api/java/lang/Runtime.html#addShutd= ownHook(java.lang.Thread) --=20 Yves Lafon - W3C "Baroula que barouleras, au ti=E9u toujou t'entourneras."