2008/10/10 Solomon Duskis <[EMAIL PROTECTED]>: > I've looked at the Spring/JAX-RS integrations that Jersey and RESTEasy > provides. > > Honestly, I haven't considered using Spring to configure @Context and > @PathParam, but it does seem to be an interesting topic. I have a question > on this... I understand how @Context can be injected when it's applied to a > setter/constructure/member variable. You'd have a request scoped Resource > and request scoped @Context beans based on a @Povider, or something like > that. > > I don't quite understand how Guice (or Spring) would populate method level > @PathParam/@CookieParam/@MatrixParam variables since they change per > reqeust; would you create a request scoped Guice bean per > @PathParam/@CookieParam that's created at startup time? Would you be able > to support "optional" dependencies for optional parameters? Would you treat > a JAX-RS method as a @Provider method?
Yeah, you could just create a request scope (rather like Struts does) and a Resource bean for each request, injecting whatever request specific state is required -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
