|Don't get programmatical cache invalidation to work [JPA] [message #788067]
||Wed, 01 February 2012 05:03
| Missing name Missing name
Registered: July 2009
my database is externally modified so at some point I need to invalidate the entity cache in my web application.
I wrote a servlet which basically does the following:
@PersistenceContext // injected via Spring
JpaEntityManager nativeEm = em.unwrap(JpaEntityManager.class);
// this method always throws an NPE
Session session = nativeEm.getSession();
I also tried the other flavors of get*Session(), but none of them worked. What is the correct way to get access to an active session?
GlassFish 3.1.1 w/ EclipseLink 2.3.0
Powered by FUDForum
. Page generated in 0.03144 seconds