You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pe...@apache.org on 2005/11/12 13:30:06 UTC
svn commit: r332766 - in /tomcat:
connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
container/tc5.5.x/webapps/docs/changelog.xml
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r332766 - in /tomcat: connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
container/tc5.5.x/webapps/docs/changelog.xml
Posted by Peter Rossbach <pr...@objektpark.de>.
When we want use different Handler it was easier we
don't create the ConnectionHandler inside constructor.
Can we use a init() method instead?
protected Http11ConnectionHandler createConnectionHandler() {
...
}
public void init() throws Exception {
cHandler = createConnectionHander() ;
ep.setConnectionHandler( cHandler );
Can you please test my last checkin?
Peter
Costin Manolache schrieb:
>On 11/12/05, pero@apache.org <pe...@apache.org> wrote:
>
>
>>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 :-)
>>
>>
>
>
>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);
>> }
>>
>> /**
>> 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);
>> }
>>
>>
>>
>
>
>Can we have the setSoLinger, etc in the base as well ? After this
>change, the base is probably broken - I'm using it as non-jmx,
>standalone http connector.
>Maybe in an init function - overriden ?
>
>
>Costin
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r332766 - in /tomcat: connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java container/tc5.5.x/webapps/docs/changelog.xml
Posted by Costin Manolache <co...@gmail.com>.
On 11/12/05, pero@apache.org <pe...@apache.org> wrote:
> 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 :-)
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);
> }
>
> /**
> 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);
> }
>
Can we have the setSoLinger, etc in the base as well ? After this
change, the base is probably broken - I'm using it as non-jmx,
standalone http connector.
Maybe in an init function - overriden ?
Costin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org