Why we can set maxSpareThreads and minSpareThreads at APR Http and APR AJP threadpools?

I have seen another strange behaviour:

After a small load 100000 requests and two hour no request the
AJP and HTTP Server sockets are closed and threadspools are not running anymore (running jmx attribute say false).

When signal the process a shutdown. I see following message inside the log:

INFO | jvm 2 | 2005/11/23 22:00:01 | 23.11.2005 22:00:01 org.apache.coyote.ajp.AjpAprProtocol pause INFO | jvm 2 | 2005/11/23 22:00:01 | INFO: Pausing Coyote AJP/1.3 on ajp-20012 INFO | jvm 2 | 2005/11/23 22:00:02 | 23.11.2005 22:00:02 org.apache.catalina.core.StandardService stop
INFO   | jvm 2    | 2005/11/23 22:00:02 | INFO: Stopping service Catalina
INFO | jvm 2 | 2005/11/23 22:00:02 | 23.11.2005 22:00:02 org.apache.catalina.connector.MapperListener destroy INFO | jvm 2 | 2005/11/23 22:00:02 | WARNUNG: Error unregistering MBeanServerDelegate
INFO   | jvm 2    | 2005/11/23 22:00:02 | java.lang.NullPointerException
INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:161) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.connector.Connector.stop(Connector.java:1132) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.core.StandardService.stop(StandardService.java:521) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.startup.Catalina.start(Catalina.java:576) INFO | jvm 2 | 2005/11/23 22:00:02 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 2 | 2005/11/23 22:00:02 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) INFO | jvm 2 | 2005/11/23 22:00:02 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) INFO | jvm 2 | 2005/11/23 22:00:02 | at java.lang.reflect.Method.invoke(Method.java:585) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) INFO | jvm 2 | 2005/11/23 22:00:02 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 2 | 2005/11/23 22:00:02 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) INFO | jvm 2 | 2005/11/23 22:00:02 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) INFO | jvm 2 | 2005/11/23 22:00:02 | at java.lang.reflect.Method.invoke(Method.java:585) INFO | jvm 2 | 2005/11/23 22:00:02 | at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:159) INFO | jvm 2 | 2005/11/23 22:00:02 | at java.lang.Thread.run(Thread.java:595) INFO | jvm 2 | 2005/11/23 22:00:02 | 23.11.2005 22:00:02 org.apache.coyote.http11.Http11AprProtocol destroy INFO | jvm 2 | 2005/11/23 22:00:02 | INFO: Stopping Coyote HTTP/1.1 on http-20011 INFO | jvm 2 | 2005/11/23 22:00:02 | 23.11.2005 22:00:02 org.apache.catalina.connector.Connector stop INFO | jvm 2 | 2005/11/23 22:00:02 | SCHWERWIEGEND: Coyote connector has not been started

---
I have looked inside MapperListener Code
   public void destroy() {
       try {

           ObjectName objectName = new ObjectName(
                   "JMImplementation:type=MBeanServerDelegate");
           mBeanServer.removeNotificationListener(objectName, this);
       } catch (Exception e) {
           log.warn("Error unregistering MBeanServerDelegate", e);
       }
   }

But the only chance to get a NPE is that MapperListener was not initialized!!

Very strange,
Peter




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to