How to @Inject a HttpSession object in a service layer (DAO) class in GWT using Guice?
问题 I have such a dirty code in my GWT app, some of the classes of my service layer depend on an HttpSession object. So for example, in one of my DAO (which was a GWT-RPC endpoint) I have something like this : public class MyExampleDAO extends RemoteServiceServlet { public findItems() { // here I need to get the object session to retrieve the currently logged in user in order to query for all its items... } } The problem is that, I am currently migrating the code to use RequestFactory. My DAO