tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Making AJP secret attribute consistent
Date Fri, 14 Aug 2009 00:02:19 GMT
2009/8/13 Mladen Turk <mturk@apache.org>:
> On 13/08/09 19:43, Konstantin Kolinko wrote:
>>>
>>> Other option is to use required.secret instead requiredSecret
>>> Much easier because requiredSecret isn't document, so one
>>> can only find it browsing the source code.
>>>
>>> However dunno how to make it using current property set/get methods
>>>
>>
>> I have just noticed - the following patch (as currently proposed for
>> tc6.0) is an example of implementing such a dot property
>> ("socket.unlockTimeout"):
>>
>> * Improve NIO connector shutdown time by doing shutdowns in parallel
>>   and with a timeout
>>   http://svn.apache.org/viewvc?view=rev&revision=791914
>>
>> I have not dug into details yet, though.
>>
>
> It looks like magic ;)
> I always thought that setName(...) reflects name="...",
> now it seems it's possible to have setName(...) and socket.name="..."
>

... The implementation, in this case, is in NioEndpoint#setProperty()
 {
        final String selectorPoolName = "selectorPool.";
        final String socketName = "socket.";
            if (name.startsWith(selectorPoolName)) {
                return IntrospectionUtils.setProperty(...);
            } else if (name.startsWith(socketName)) {
                return IntrospectionUtils.setProperty(...);
            } else {
                return IntrospectionUtils.setProperty(this,name,value);
            }
}

and it is o.a.tomcat.util.IntrospectionUtils#setProperty(..) that
looks for the "setProperty" method if explicit setter is not
available.

Best regards,
Konstantin Kolinko

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


Mime
View raw message