tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Is there a clean way to add Custom protocol endpoint to tomcat 5.5
Date Sat, 29 Apr 2006 01:44:49 GMT

"David Gagnon" <dgagnon@siunik.com> wrote in message 
news:4451FDB6.8030605@siunik.com...
> Bill Barker wrote:
>
>>"David Gagnon" <dgagnon@siunik.com> wrote in message 
>>news:445148FD.50300@siunik.com...
>>
>>>Hi all,
>>>
>>>I need to have my tomcat servers to broadcast their state (custom 
>>>information) in order for them to collaborate.
>>>
>>>I look into the cluster code, org.apache.catalina.cluster.mcast.* it a 
>>>good example of what I need : send a multicast message each X seconds and 
>>>keep a member list with their public info.
>>>
>>>My problem is to fin a way to starts MY protocol endpoint when Tomcat 
>>>boots.  I don't want to put the code in my webApp, since I can have 
>>>several webapps on the same server.
>>>
>>>I looked into server.xml to find a way to starts it... I tought Connector 
>>>would be suitable for my needs but it seems strictly related to HTTP 
>>>request handling.
>>>
>>>
>>
>>In theory, you can write a ProtocolHandler for any protocol you like and 
>>plug it into the Connector.  However, you are right that this is for 
>>Request processing.
>>
> Is server.xml supports a custom protocol Handler? For what I looked it 
> seem to be predefined connector one for HTTP, HTTPS and AJP/1.3.
> If it possible in some way to hook by there I can live whith the fact that 
> is not the way that supposed to be used :-)
>
>
> <Connector port="8080" maxHttpHeaderSize="8192"
>               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>               enableLookups="false" redirectPort="8443" acceptCount="100"
>               connectionTimeout="20000" disableUploadTimeout="true" />
> <Connector port="8009"
>               enableLookups="false" redirectPort="8443" protocol="AJP/1.3" 
> />
>
>

    <Connector port="nnn" protocol="com.myfirm.mypackage.MyProtocolHandler" 
.... />

The values AJP/1.3 and HTTP/1.1 are just shortcuts for the respective 
default ProtocolHandlers.

>
>
>>You could take a look at Tribes (container/modules/groupcom in the 5.5.17+ 
>>source distro/SVN co).  It's still a work-in-progress, but it may let you 
>>do what you want.
>>
> Thanks for the info I'll look into it!
>
> Best Regards
> /David
>
>>
>>>I hope to find a way without changing the tomcat code base.
>>>
>>>Thanks for your help.
>>>Best Regards
>>>/David
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>> 




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


Mime
View raw message