tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r772142 - /tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
Date Tue, 12 May 2009 13:29:01 GMT
Konstantin Kolinko wrote:
> 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.

Given I can get engine from host - I went with that. Slightly cleaner and I
don't think remembering the engine is worth it. If we were going to remember
anything extra, we should remember the server but I'm not sure it is worth it.

Mark


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


Mime
View raw message