Author: fhanik
Date: Tue Mar 27 18:36:22 2007
New Revision: 523135
URL: http://svn.apache.org/viewvc?view=rev&rev=523135
Log:
Enhancement request-bugzilla
http://issues.apache.org/bugzilla/show_bug.cgi?id=41128
Ability to track execution thread in the RequestInfo object for management
purposes
Patch submitted by Vlad Ilyushchenko
Modified:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
Modified:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java?view=diff&rev=523135&r1=523134&r2=523135
==============================================================================
--- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
(original)
+++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
Tue Mar 27 18:36:22 2007
@@ -44,14 +44,14 @@
public RequestGroupInfo getGlobalProcessor() {
return global;
}
-
+
public void setGlobalProcessor(RequestGroupInfo global) {
if( global != null) {
this.global=global;
global.addRequestProcessor( this );
} else {
if (this.global != null) {
- this.global.removeRequestProcessor( this );
+ this.global.removeRequestProcessor( this );
this.global = null;
}
}
@@ -62,6 +62,7 @@
Request req;
Response res;
int stage = Constants.STAGE_NEW;
+ String workerThreadName;
// -------------------- Information about the current request -----------
// This is usefull for long-running requests only
@@ -212,5 +213,11 @@
this.errorCount = errorCount;
}
+ public String getWorkerThreadName() {
+ return workerThreadName;
+ }
+ public void setWorkerThreadName(String workerThreadName) {
+ this.workerThreadName = workerThreadName;
+ }
}
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
URL:
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java?view=diff&rev=523135&r1=523134&r2=523135
==============================================================================
---
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
(original)
+++
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
Tue Mar 27 18:36:22 2007
@@ -143,7 +143,7 @@
}
try {
-
+
req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
// Parse and set Catalina and configuration specific
// request parameters
if ( postParseRequest(req, request, res, response) ) {
@@ -159,6 +159,7 @@
} catch (Throwable t) {
log.error(sm.getString("coyoteAdapter.service"), t);
} finally {
+ req.getRequestProcessor().setWorkerThreadName(null);
// Recycle the wrapper request and response
request.recycle();
response.recycle();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]