Hmm, well without changing much other than the exposed API, perhaps a bean that holds defined contexts and enforces a contract. i.e: n adapter.addContext(ContextType context). So that if I had a ServletAdapter, and I wanted to load the same context to a web adapter, I could reuse the new GrizzlyContextContainer :) for both. then you could ditch the add context String from the adapter and the second field would be this new data type rather than an array.
--Richard
----- Original Message ----
From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
To: users_at_grizzly.dev.java.net
Sent: Thursday, January 29, 2009 2:09:38 PM
Subject: Re: ServletAdapter Issue/question :)
Salut,
Richard Corsale wrote:
> well ok, I havnt looked at the grizzly server n a few months. I have 9.3 now and a few things poped up at me that I found odd.
>
> 1. why is the addGrizzlyAdapter(ServletAdapter) depreciated in favour of addGrizzlyAdapter(ServletAdapter, String[])?
Because before the way we were mapping requests to Adapter was sequential, invoking them one by one), and now we are using a more performant approach.
The context is clearly defined in the servletAdapter and if you drop the no array version, you are going to make the user redefine this in an array when they add it? I mean from a usability standpoint I feel its better suited as a property of the adapter, and perhaps should be encapsulated there.. But it seems that if you were going to force the context to adapter relationship at the addAdapter junction, you should also depreciate the ability to add context to the adapter itself?
I kind of agree with you it is not perfect...except we are talking about GrizzlyAdapter here, not ServletAdapter exclusively. That why the information is kind of duplicated. I didn't want to add any new API to the GrizzlyAdapter abstract classes hence this new API.
>
>
> 2. Why in the world are you still using arrays :)
:-) Any recommendation?
A+
-- Jeanfrancois
>
>
>
> --Richard
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
For additional commands, e-mail: users-help_at_grizzly.dev.java.net