RequestFactory는 항상 Proxcy의 유효성체크를 하는데 delete후에도 findEntity()함수를 호출하기에
삭제가 되버렸기에 오류가 남.
그래서 아래와 같이 RuntimeException 처리를 해 주면됨.
public static Message findMessage(Long id) { PersistenceManager pm = PMF.get().getPersistenceManager(); try { return pm.getObjectById(Message.class, id); } catch(RuntimeException e) { return null; } finally { pm.close(); } }
참고 url
http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg56356.html http://code.google.com/p/google-web-toolkit/issues/detail?id=6721#c3 http://stackoverflow.com/questions/9476341/requestfactory-theory-why-is-locator-find-being-called-so-often http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg53586.html