Realtime notification of ThreadPool logFull

2006-11-17 Thread jwboring

I need to be notified when ever a Tomcat v5.5 server is over the threadpool
limit. I am already monitoring log4j log messages but the logFull message
appears to me to be a System.out log, by-passing log4j (catalina.out text
shown below).

Nov 17, 2006 12:08:25 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (10) are currently busy, waiting. Increase maxThreads

If my above assumption is correct, how can I monitor ThreadPool logFull
messages without reading the catalina.out file and parsing? Also, I'm aware
of the ThreadPool mbean and already use JMX to query this mbean to display
it's properties. However, I don't believe this mbean supports JMX
notifications. Of course, I could spawn a thread every X minutes but that
seems dumb. Can I do this with a LifeCycle Listener? Is there a way to get
log4j messages e.g., log.error("logFull SEVERE: All threads ...") from the
ThreadPool object?

Jeff
-- 
View this message in context: 
http://www.nabble.com/Realtime-notification-of-ThreadPool-logFull-tf2654425.html#a7405640
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Realtime notification of ThreadPool logFull

2006-11-18 Thread jwboring


Nelson, Tracy wrote:
> Why not just grab the source

I looked at the source (org.apache.tomcat.util.threads.ThreadPool) and it IS
logging to the commons logger - see below.

private static void logFull(Log loghelper, int currentThreadCount,
int maxThreads) {
if( logfull ) {
log.error(sm.getString("threadpool.busy",
   new Integer(currentThreadCount),
   new Integer(maxThreads)));
logfull=false;
} else if( log.isDebugEnabled() ) {
log.debug("All threads are busy " + currentThreadCount + " " +
  maxThreads );
}
}


But this is NOT the log I am getting in catalina.out. Instead, I am getting,
"Nov 17, 2006 12:08:25 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (10) are currently busy, waiting. Increase maxThreads."
What gives? I am getting other normal info, etc ... level messages but not
this one. Using v5.5.17.

Jeff
-- 
View this message in context: 
http://www.nabble.com/Realtime-notification-of-ThreadPool-logFull-tf2654425.html#a7419824
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Realtime notification of ThreadPool logFull

2006-11-18 Thread jwboring


Martin Gainty wrote:
> 
> your diagnostic appears out of sync with your source. where did you
> acquire the source?
> 

The app is deployed under the the binary distribution gotten from the web
site (http://tomcat.apache.org/download-55.cgi). We do not compile from the
source, at least not yet. I only got the source to check the log code.
Source came from the archives
(http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/). Can anyone
explain the log message I am getting that does not appear to be to commons
log? 

I'll install v5.5.20 Monday from binary and see if I get the same strange
log.

Jeff
-- 
View this message in context: 
http://www.nabble.com/Realtime-notification-of-ThreadPool-logFull-tf2654425.html#a7424775
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to apply filter to 404's in servlet 2.3?

2007-08-13 Thread jwboring

I would like to have a filter invoked when ever a request comes in that does
not represent a valid page/url (404's). What we are doing now is mapping the
error-code to a jsp page that redirects via 
(see code below) but of course that is another round trip and therefore not
optimal.


Code:


  routerRedirectInputFilter
  /unknown.req


.


404
/rr.jsp


I have tried replacing the c:redirect with a jsp:forward but this does not
invoke the filter. I suspect this is not possible with v2.3 but might be
with v2.4. 

Thoughts?
__
Jeff Boring
-- 
View this message in context: 
http://www.nabble.com/How-to-apply-filter-to-404%27s-in-servlet-2.3--tf4261634.html#a12127511
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]