On Friday, October 5, 2012 8:24:23 PM UTC+2, Arthur Gregório wrote:
>
> Yes, 
>
> in the initial message I sent a code where I set the injector in the 
> session,
>

No, it was put in the ServletContext.
 

> and this was exactly my question: is it correct to do that? how to handle 
> the injector so that I do not have to keep instantiating him in every 
> service call?
>

I think you can just make sure in your 
ServletContextListener#contextDestroyed that you 
removeAttribute(Injector.class.getName()). Have a look at the code of 
GuiceServletContextListener.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/Gyp5tidI6NMJ.
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.

Reply via email to