Aaron Anderson wrote:
>
>
> */Paul Sandoz <Paul.Sandoz_at_Sun.COM>/* wrote:
>
>> Would it be better to define an AbstractServletAdapter that can be
>> extended? since there are some subtle issues around supporting thread
>> local stuff that can be implemented by AbstractServletAdapter.
>
> That would be fantastic!
>
Can you log an issue? plus it would help if you can provide an example
of what you need so i can cater for it effectively in the abstract class.
>>> Also, I noticed WebApplicationImpl contains the method public void
>>> register(Set<Class> resourceClasses).
IIRC we talked about this before, do you want to dynamically add new
root resources to the running web application?
I think that is the reason the method is not implemented :-) because it
required some thinking about possible synchronization logic as other
threads may be operating on the list of root resources.
> Will that eventually make it
> into
>>> the WebApplication SPI?
>
>
>> We can do that. I also think it worthwhile putting a default
> ResourceConfig implementation in the API.
>
>> We are planning to change ResourceConfig so that as well as features
>> one
>> can add properties to this, this could be a way to pass in the instance
>
>> of a particular ResourceProviderFactory to the
> RootResourceClass using
> an agreed property name.
>
> Excellent!
>
Note that the ResourceProviderFactory provides support for the
life-cycle annotations so if you utilize your own provider then unless
you defer to ResourceProviderFactory or implement it yourself you will
not get that support.
Marc and I are planning, using the property bag, to specify a property
name for a default resource provider that can override the current
default, PerRequestProvider.
What if the property bag is passed as a parameter to the init method of
the ResourceProvider ? Would that solve your needs rather than creating
your own ResourceProviderFactory ?
Paul.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109