> 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
>>> 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.
> 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.
Understood.
> 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.
Thanks!
Aaron
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.