Have you looked at the Guice Servlet [1] extension? Among other features, it defines a @Request scope that is designed for exactly what you describe.
[1] http://code.google.com/p/google-guice/wiki/Servlets On 8/6/11, rod <[email protected]> wrote: > My application implements its own web server and I'd like to have a > scope for the request/response/etc... objects that get created on each > request and injected into all the individual request handling classes. > at the moment these are being manually created and injected, but i'd > like to be able to do this with guice. i've been reading the docs but > need a little advice - can i accomplish this with any of the built in > guice scopes, or will i need to create a custom scope (docs say this > is not reccomended!). > > thanks, > rod. > > -- > 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. > > -- 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.
