Comment by alex.che...@gmail.com:
I'm using an environment with guice-servlet running on a tomcat and
hibernate under guice-persist. The problem I've encountered is that when I
use em.getReference() in one request the loaded proxy object stays in the
entitymanager cache and may appear in another request where I expect to
have an object completely loaded from the DB.
I'm used to using hibernate in EJB3 environment where it is a default
behavior. The entity manager cache is clear for each new request. Isn't it
a more safe behavior for guice-persist to clear the session for each
request? Or at least to give it as a setting for JpaPersistModule?
There is a special flag in hibernate SessionImpl "autoClear" which is
responsible for EJB3-behavior. Is there any way I could enable the flag
when the new entity manager is being created by JpaPersistModule?
For more information:
http://code.google.com/p/google-guice/wiki/JPA
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to google-guice-dev@googlegroups.com.
To unsubscribe from this group, send email to
google-guice-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.