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: svn commit: r772142 - /tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
Date Sun, 10 May 2009 03:54:30 GMT
2009/5/6 Mark Thomas <markt@apache.org>:
> Remy Maucherat wrote:
>> On Wed, 2009-05-06 at 10:49 +0000, markt@apache.org wrote:
>>>          // Acquire global JNDI resources if available
>>> -        Server server = ServerFactory.getServer();
>>> +        Server server =
>>> +            ((Engine)context.getParent().getParent()).getService().getServer();
>>
>> Ouch, not pretty.
>
> Any better ideas? I thought about pulling it out into a separate method but as
> all of those parents should be non-null it seemed like overkill.
>

See how setWrapper() is already implemented in ManagerServlet.
You can remember Engine reference that it calculates there, like host
reference that is already remembered.

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