Hi, this is my problem: my service has two synchronized methods. One
of them writes events and the other listens. This works well with GWT,
but does not work uploaded in GAE.
..
private UserData user = new UserData("mjs");
..
public void writeEvent(String event) {
synchronized (user) {
user.getEvents().add(value);
user.notifyAll();
}
}
public List<String> readEvent() {
List<String> events;
while (true) {
synchronized (user) {
if (user.getEvents().size() > 0) {
events = user.getEvents();
user.setEvents(new ArrayList<String>());
break;
}
try {
user.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
return events;
}
Error LOG:
javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
com.ms.test.client.GreetingService.getAplicactionValue(java.lang.String)'
threw an unexpected exception:
com.google.apphosting.api.DeadlineExceededException: This request
(3d539ee0c5c0d7da) started at 2010/07/08 23:59:21.477 UTC and was
still executing at 2010/07/08 23:59:50.567 UTC.
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
188)
....
....
Caused by: com.google.apphosting.api.DeadlineExceededException: This
request (3d539ee0c5c0d7da) started at 2010/07/08 23:59:21.477 UTC and
was still executing at 2010/07/08 23:59:50.567 UTC.
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at
com.ms.test.server.GreetingServiceImpl.getAplicactionValue(GreetingServiceImpl.java:
79) ---> 79: user.wait();
I think user.notifyAll () will never "wake up" user.wait (), is that
correct?.
Thank you for your help
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
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-appengine-java?hl=en.