Konstantin Kolinko wrote:
> 2009/5/6 Mark Thomas <ma...@apache.org>:
>> Remy Maucherat wrote:
>>> On Wed, 2009-05-06 at 10:49 +0000, ma...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to