Author: pero
Date: Sat Nov 12 04:29:58 2005
New Revision: 332766
URL: http://svn.apache.org/viewcvs?rev=332766&view=rev
Log:
Fix that the RequestProcessor registered at JMX.
It was nice to see this information back inside manager app :-)
Modified:
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Modified:
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
URL:
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java?rev=332766&r1=332765&r2=332766&view=diff
==============================================================================
---
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
(original)
+++
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
Sat Nov 12 04:29:58 2005
@@ -54,11 +54,6 @@
public class Http11BaseProtocol implements ProtocolHandler
{
public Http11BaseProtocol() {
- cHandler = new Http11ConnectionHandler( this );
- setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
- setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
- setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
- setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
}
/**
Modified:
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
URL:
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java?rev=332766&r1=332765&r2=332766&view=diff
==============================================================================
---
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
(original)
+++
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
Sat Nov 12 04:29:58 2005
@@ -59,7 +59,11 @@
public class Http11Protocol extends Http11BaseProtocol implements
MBeanRegistration
{
public Http11Protocol() {
- super();
+ cHandler = new JmxHttp11ConnectionHandler( this );
+ setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
+ setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
+ setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
+ setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
}
@@ -124,7 +128,7 @@
if( tpData[1] instanceof Object[] ) {
tpData=(Object [])tpData[1];
}
- ObjectName
oname=(ObjectName)tpData[Http11Protocol.THREAD_DATA_OBJECT_NAME];
+ ObjectName
oname=(ObjectName)tpData[Http11BaseProtocol.THREAD_DATA_OBJECT_NAME];
if( oname==null ) return;
Registry.getRegistry(null, null).unregisterComponent(oname);
Http11Processor processor =
@@ -141,6 +145,7 @@
JmxHttp11ConnectionHandler( Http11Protocol proto ) {
super(proto);
+ this.proto = proto ;
}
public void setAttribute( String name, Object value ) {
@@ -155,7 +160,7 @@
// was set up by supper
Http11Processor processor = (Http11Processor)
- thData[ Http11Protocol.THREAD_DATA_PROCESSOR];
+ thData[ Http11BaseProtocol.THREAD_DATA_PROCESSOR];
if( proto.getDomain() != null ) {
try {
@@ -165,7 +170,7 @@
(proto.getDomain() + ":type=RequestProcessor,worker="
+ proto.getName() +",name=HttpRequest" + count++ );
Registry.getRegistry(null, null).registerComponent( rp,
rpName, null);
- thData[Http11Protocol.THREAD_DATA_OBJECT_NAME]=rpName;
+ thData[Http11BaseProtocol.THREAD_DATA_OBJECT_NAME]=rpName;
} catch( Exception ex ) {
log.warn("Error registering request");
}
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=332766&r1=332765&r2=332766&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat Nov 12 04:29:58 2005
@@ -96,6 +96,9 @@
<fix>
Fix hidden NPEs when using the APR connectors and there's no host
header. (pero, remm)
</fix>
+ <fix>
+ Http11Protocol now register RequestProcessor at JMX and show current
usage inside manager app. (pero)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]