GuiceRemoteServiceServlet is a wrapper servlet for GWT RPC utilizing Guice for managing RemoteService implementation object's lifecycle.
<servlet>
<servlet-name>GWT-RPCServlet</servlet-name>
<servlet-class>com.gc.gwt.server.GuiceRemoteServiceServlet</servlet-class>
<init-param>
<param-name>guice.module</param-name>
<param-value>com.test.guice.MyGuiceModule</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>GWT-RPCServlet</servlet-name>
<url-pattern>/GWT.rpc</url-pattern>
</servlet-mapping>
- map all you remote service implementations in Guice Module
- define and map GuiceRemoteServiceServlet as shown above
- point ALL services to the same /GWT.rpc
The source for the GuiceRemoteServiceServlet can be found here.
Good luck.
PS: GuiceRemoteServiceServlet depends on Guice and apache-commons beanutils.
PS2: The source of GuiceRemoteServiceServlet is distributed under Apache 2.0 License.
1 comments:
Hi,
The httpServlet(Request|Session) should be injected by Guice, using GuiceFilter which set them (request|session) in a thread local variable.
hih
Post a Comment