On Fri, 17 Aug 2001, Grobe, Gary wrote:

> I've posted this before and am still looking for a solution.
> 
> After reading the Tomcat architecure docs, I have a question.
> 
> Is there anyway to call the invoke method of a container from the webserver
> whenever needed. i.e. If I wanted to get the time it takes for the web
> server to process a request (meaning I'd like the webserver to handle the
> request), could the server engine be invoke()'d to startTime and when the
> webserver finished handling the request, is there some way it could be
> invoked again to stopTime so that I'd know how long it took?
> 

In general, no ... remember that the web server and Tomcat will often be
running in separate processes, and sometimes on separate servers.  So, any
call like that would do this would have to be added to the network
protocol used by the web connector.

> Note, I don't want to know how long the container took to execute the
> service, rather, how long it took for the webserver to execute. But I'd like
> to use the container for timing (a java solution as it would run on many
> webservers) and not have to use plug-ins.
> 
> I know that in order for the servlet to do this it must handle the request
> and I could get the times from the response and then the request, but I'm
> looking to see if I can *monitor* (if that's the right word) the web servers
> performance and time a the time it took to process a request. Maybe someway
> to make callbacks to the webserver?
> 
> My reason for wanting apache to handle the requests is because of sites that
> have very large connection loads that our clients/or Tomcat will not accept
> performace wise. 
> 
> Thanks,
> Gary
> 

The suggestion I gave you before still makes sense to me -- look for an
Apache module plug-in that times things for you.  The fact that the
request gets forwarded to Tomcat should be transparent to such a gadget.

Craig


Reply via email to