Andy
unread,Sep 3, 2011, 10:56:42 AM9/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hi,
I have an example class
public class Employee {
public static Employee findEmployee(ObjectId id) {
.................
System.out.println("find");
return employee;
}
......
}
When triggering the findEmloyee from the client side via
RequestContext, the line 'System.out.println("find");' was called
twice, I check that it is called from the class
SimpleRequestProcessor, from the two method
method createReturnOperations, triggered by the line
} else if (!service.isLive(domainObject)) {
in the method
method processInvocationMessages, triggered by the line
domainReturnValue = service.invoke(domainMethod,
args.toArray());
Both this method is triggered from the method
void process(RequestMessage req, ResponseMessage resp)
The questions is why createReturnOpration need to find the employee
again which i think is unnecessary.
It is just loaded from the database and then it will hit the database
again for the same query? Am I doing something wrong here ?
Kind Regards
Andy