You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2009/08/12 15:18:46 UTC
Re: Making AJP secret attribute consistent
2009/8/4 Mladen Turk <mt...@apache.org>:
> Hi,
>
> JK connector uses the request.secret attribute for setting the
> AJP secret property. However APR connector and Ajp connector
> use the requiredSecret instead. This of course (first problem is
> that it's nowhere documented) makes problems cause it requires to
> have separate directives depending on the connector.
>
> Since attributes having dot in the name cannot be parsed using
> standard xml property getter I propose we add the same property
> to the JK connector and deprecate old dot name (request.secret)
>
> Comments?
>
> Regards
> --
> ^TM
1. I do not see "requiredSecret" in documentation. Thus the problem is
that it is not documented.
2. There are quite a lot of properties that use a dot in their name. See here:
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
(Index > Configuration Reference > AJP , / > HTTP )
I do not really mind renaming all of them to get rid of dots, but that
is probably what we should not do. :/
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Making AJP secret attribute consistent
Posted by Rainer Jung <ra...@kippdata.de>.
On 13.08.2009 20:31, Mladen Turk wrote:
> 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="..."
A similar feature is used in the cluster. The cluster configuration has
elements for the Cluster, Membership, Sender and Receiver, but not e.g.
for the Manager. If you want to set property xxx on the cluster manager,
you can configure manager.xxx inside the Cluster element.
So the part before the dot should express some kind of related class the
param should be passed to. That would be true for request.secret, but
not for required.secret.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Making AJP secret attribute consistent
Posted by Bill Barker <bi...@verizon.net>.
Since Mark has already removed the o.a.jk connector from trunk, I'd prefer
to just fix the docs there and use requiredSecret etc. In the other branches
it is easy enough to teach the o.a.jk connector to accept requiredSecrect as
an alias for request.secrect, so even here I'd vote to add the alias and
change the docs.
"Konstantin Kolinko" <kn...@gmail.com> wrote in message
news:427155180908131702v4778a5ffj84770f36e2d0c407@mail.gmail.com...
2009/8/13 Mladen Turk <mt...@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
Re: Making AJP secret attribute consistent
Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/8/13 Mladen Turk <mt...@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
Re: Making AJP secret attribute consistent
Posted by Mladen Turk <mt...@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="..."
Regards
--
^TM
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Making AJP secret attribute consistent
Posted by Konstantin Kolinko <kn...@gmail.com>.
>
> 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.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Making AJP secret attribute consistent
Posted by Mladen Turk <mt...@apache.org>.
On 12/08/09 15:18, Konstantin Kolinko wrote:
> 2009/8/4 Mladen Turk<mt...@apache.org>:
>> Hi,
>>
>> JK connector uses the request.secret attribute for setting the
>> AJP secret property. However APR connector and Ajp connector
>> use the requiredSecret instead. This of course (first problem is
>> that it's nowhere documented) makes problems cause it requires to
>> have separate directives depending on the connector.
>>
>> Since attributes having dot in the name cannot be parsed using
>> standard xml property getter I propose we add the same property
>> to the JK connector and deprecate old dot name (request.secret)
>>
>> Comments?
>>
>> Regards
>> --
>> ^TM
>
> 1. I do not see "requiredSecret" in documentation. Thus the problem is
> that it is not documented.
>
Already said that ;)
> 2. There are quite a lot of properties that use a dot in their name. See here:
> http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> (Index> Configuration Reference> AJP , /> HTTP )
>
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
Regards
--
^TM
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org