tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Tomcat7.0-Setting property 'threadPriority' did not find a matching property
Date Mon, 03 Dec 2012 05:51:18 GMT
> From: Weixiang [mailto:kurt.weixiang@huawei.com] 
> Subject: Tomcat7.0-Setting property 'threadPriority' did not find a matching property

> I config in my server.xml for a HTTP Connector named "MGMT":
    
> threadPriority="java.lang.Thread#Thread.MAX_PRIORITY"

The documentation may give the impression that you can set the value of the threadPriority
attribute to a string referring to some static field, but that is not actually the case. 
You must supply a numeric value here, which will normally be 10 for the maximum.  You can
write a simple Java program to display the values of Thread.MIN_PRIORITY and Thread.MAX_PRIORITY,
and choose a number within that range.

class ThreadPriority {
  static public void main(String args[]) throws Exception {
    System.out.format("thread priorities: MIN %d, NORM %d, MAX %d%n",
                      Thread.MIN_PRIORITY, Thread.MIN_PRIORITY, Thread.MAX_PRIORITY);
  }
}

The JDK 7 Javadoc includes a description for the priority values, but it doesn't appear to
be completely accurate:
http://docs.oracle.com/javase/7/docs/api/constant-values.html#java.lang.Thread.MAX_PRIORITY

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message