users@jersey.java.net

Re: Using HttpServletRequest/HttpServletResponse

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 18 Sep 2007 19:27:56 +0200

Aaron Anderson wrote:
>
> > 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.
>
> Done. Issue #13
>

Thanks.


> >>> 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.
>
> Due to the nature of the application I am working on I would like to
> have the ability to "hot deploy" new resource classes and instances to
> the WebApplication on the fly. In my application I do not believe this
> will occur very often so creating a new WebApplication instance and
> throwing away the old one should work fine for now. This would be a
> nice to have added in a much later release once the JSR 311 spec
> finalizes and Jersey stabilizes accordingly.
>

OK.


> > 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 ?
>
> That is probably a better idea and keeps the ResourceProvider factory in
> form with the Factory pattern. As you guys deduced my intention of
> creating a custom ResourceProviderFactory was two fold:
>
> 1. To specify my own ResourceProvider implementation as the default one
> so I would not need to annotate all my resources with a custom
> ResourceFactory annotation
>
> 2. Allowing state to be passed into the ResourceProvider implementation
> in order for it to instance and inject @Resources based on context.
>
> By making the changes you discussed above it would fulfill my needs and
> it would be a more elegant design.
>

Done, should be in the latest build, but i do not have time to add a
unit test for testing the property tonight, so it may not work...

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109