users@grizzly.java.net

Re: How does mapping work?

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Mon, 31 May 2010 13:55:09 +0200

> Though I'm still curious about why it works like this.
> Basically, I'd like to understand whether there is a reason it must
> work this way before filing an RFE.
Well, the reason is that Mapper, if it can't find GrizzlyAdapter,
which corresponds to the entire URL - looks for the GrizzlyAdapter,
responsible for the context-root only. That's why it finds HelloWorld
and HelloMars.
Why you see different GrizzlyAdapters to be picked up? It's because we
store GrizzlyAdapter->URL relationship in a HashMap<GrizzlyAdapter,
String[]>, then, when you start WebServer we register those
relationships in the Mapper object. So considering that by default
Mapper is *not* overriding GrizzlyAdapters, responsible for the
specific context-root - everything depends on order HashMap.iterator
will return registered GrizzlyAdapters and this order is undefined.
That's why you may see different GrizzlyAdapters been called.

WBR,
Alexey.

>
>> WBR,
>> Alexey.
>
> Thank you and best regards,
> Andrea
>
>
> --
> Andrea Gualano
> ImaVis S.r.l.
> email: andrea.gualano_at_imavis.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>