----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Hi,
I'm not sure this will really answer your question, but it may give
you a lead...
>I want to write an admin servlet that lets me:
> - see the current number of sessions active in jserv
> - forcibly evict some sessions if I need to
> - restart the server
> - schedule the server to restart when the num of sessions drops to 0
"Java Servlet Programming", by Jason Hunter (O'Reilly)
describes how the first two tasks (display of and forced expiration
of other sessions) can be done with a simple servlet.
However, for the 3rd and 4th tasks, you may need
to get more creative (a servlet cannot restart the servlet engine).
>I was thinking that maybe I should write my own object that extends
>jserv, and run that instead of jserv. This gives me access to
>a bunch of protected jserv methods that allow me to restart etc.
>But I don't think it gives me access to jserv internals like session
>management etc.
>
>What can I do to "peek" inside a running jserv and send it restart
>signals etc?
Whatever you do, take a look at how the jserv engine status
mechanism works before you do anything else.
This is enabled in the "jserv.conf" file by changing
<Location /jserv/>
SetHandler jserv-status
order deny,allow
deny from all
allow from localhost
</Location>
to
<Location /jserv/>
SetHandler jserv-status
order deny,allow
deny from all
# TEMPORARY (insecure!) - restore later!!!
allow from all
</Location>
or whatever it takes for you to access the jserv-status handler.
Then invoke it with
http://www.yourserver.com/jserv/
>thanks,
>naeem
Hope that gives you some ideas.
Stephen
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]