Friday, February 25, 2011

Re: Outofmemory when call findxxx many times

Just a short note: You can remove the @SuppressWarnings annotation when using em.createQuery(query, Scenario.class)

Your server code seems ok. We do not use RequestFactory yet but we are sometimes fetching a lot of entities on our server (Glassfish 3.1 + bundled Eclipselink 2.2) and haven't seen any problems yet. For each request to our server we create a new EntityManager instance and when we are done we call em.clear() and em.close(). Our EntityManagerFactory is pretty much a singleton and will be created once for each new customer doing the first server request. We also deactivated the EntityManagerFactory cache (second level cache). For testing purposes you can clear the second level cache in your code by calling emf.getCache().evictAll().

Maybe you can create a rpc remote service and call your findXXX method via the service to see if its a RequestFactory bug or if its a JPA related problem.

--
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