--

Aravind Subramanian wrote:
> 
>  I'm writing a Java server for messaging and I sometimes need to restart it to 
>reload classes that it
> uses (and that I have changed). This is similar to restarting the JServ engine / web 
>server. My question
> is - how does the script that restarts the servlet engine, shut it down cleanly and 
>effect the restart? A
> pointer to the script that does this will be most helpful.


The shutdown is built into the AJPv11 protocol (have a look at
http://java.apache.org/jserv/protocol/AJPv11.html under 'signals').
Unfortunately, java itself will not pass on any signal it receives to
your application elegantly. 

The functionality you want (class reloading after modification) is
handled nicely by the AdaptiveClassLoader that JServ uses, by checking
the modification dates on .class and .jar files - you could write your
own class loader using AdaptiveClassLoader as a model!

Damian

-- 
Damian Fauth                                       201 Sussex Street
Software Engineer                                   Sydney, NSW 2000
John Fairfax Holdings Ltd                                  Australia
[EMAIL PROTECTED]                    Ph. (+612) 9282 3528


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to