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
--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment