getThreadLocalRequest() returns null

98 views
Skip to first unread message

jopaki

unread,
Nov 10, 2006, 4:10:35 AM11/10/06
to Google Web Toolkit
In an RPC service implementation of mine (which is invoked by
GWTHandler), invoking this method:
this.getThreadLocalRequest();
returns null.

I am running in HOST mode with an external web server w/ a Spring
context. I am employing the GWTHandler as advertised. I am able to
step through both the client GWT JVM and the server app JVM no problem.
Do I need to do anything special with regard to GWTHandler? Is it
because I'm in host mode?

georgeuoa

unread,
Nov 10, 2006, 5:32:23 AM11/10/06
to Google Web Toolkit
Hello jopaki

GWTHandler forwards RPC to your pojo services. The fact that you have a
getThreadLocalRequest() method in your service implies that you are
extending either the RemoteServiceServlet or the GWTSpringController -
both of which rely on the fact that they are the entry point to the
RPC, which of course is not true if they are in fact demoted to a
simple service using the GWTHandler.

The summary: you can't (and thus shouldn't) extend
RemoteService/GWTSpringController if you intend to use it with the
GWTHandler. If you do need a hold on the Request/Response objects check
out a new version of the GWTHandler from the svn (a proper release
should follow during the next week) which provides ways of obtaining
these objects. Please also read the discussion at [1].

BR
G.

[1]
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/9eed3095f66f98cf/8e1f7c5b0571ad19

jopaki

unread,
Nov 10, 2006, 2:46:11 PM11/10/06
to Google Web Toolkit
G, Thank you so much for the skinny. - j

Reply all
Reply to author
Forward
0 new messages