tomcat-users mailing list archives

There should never be a reason to replace the Connector in Tomcat, since all
it does is serve as a bridge. Also, in TC 5.5.x, the Connector is strongly
integrated with the container code, so it is is almost certainly more
trouble than it is worth to try.
The recommended way to do what it sounds like you want is implement your own
ProtocolHandler
(http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/coyote/ProtocolHandler.html).
You tell Tomcat to use your ProtocolHandler by:
<Connector protocol="com.unisys.mypackage.MyProtocolHandler" ... />
Any other xml attributes you put in the <Connector> tag will be passed to
your class in JavaBean convention. You will also likely want to define an
ActionHook
(http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/coyote/ActionHook.html)
to get Tomcat to work properly with your implementation.
"Dobbins, Michael G" <Michael.Dobbins@unisys.com> wrote in message
news:B05D2E415E8CC94897BB44233D14EE68028387D2@USTR-EXCH5.na.uis.unisys.com...
In tomcat 5.0.28, we were able to replace the coyote connector using a
"className" setting in the connector in server.xml. In tomcat 5.5.9 it
looks like "className" is ignored. Looking at the source, it looks like
the Connector is hardcoded in. Is this the case or am I missing
something?
My next attempt, I repackaged our connector to replace the
org.apache.catalina.connector package and put that in the
-Xbootclasspath to override the released version. With -verbose:class
set I can see my Connector being loaded, but the next class loaded is
java/lang/reflect/InvocationTargetException and the JVM terminates. The
documentation says that this is used to wrap an exception when a method
or constructor is called by reflection. As I said above it looks to me
like the constructor is called directly not via reflection. Am I
missing something obvious?
I know that using the AJP connector is a cleaner way, but we estimate
the serialization overhead will cost us about 5% on our platform.
Thanks
mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org