2010/3/25 Lothar Kimmeringer <j...@kimmeringer.de> > Ho Jimmy schrieb: > > > I am new to GWT. So, this is a newbie question but I have google it a > > while but I am not able to find a simple example. > > How can I create the servlet thread safe? For traditional servlet, we > > use Threadlocal. So how can we define the similiar for GWT RPC servlet? > > Pls also describe a bit about the thread pool and I can have some > > direction of my learning. > > The RPC-servlet is a regular servlet, so the way you solved > it with other servlets should work there as well. Personally > I ensure thread safety by not using global variables. Parts > that use concurrent resources I put into a synchronized block. > > > Regards, Lothar > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > Thank you for the replys. Can you please post a very simple example on how the variables are accessed one thread at a time and how they are shared by different threads? This example can make this step solid for me because I dont know either how to test the servlet is thread safe or not.
Thanks a lot -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.