Details
-
Bug
-
Resolution: Done
-
Major
-
EAP 5.0.1.CR3, EAP 5.0.1, EAP_EWP 5.1.0_CR1, EAP_EWP 5.1.0_CR2, EAP_EWP 5.1.0_CR3, EAP_EWP 5.1.0
-
None
-
Release Notes
-
Workaround Exists
-
-
-
Documented as Resolved Issue
Description
code is as follow
TransactionManager tm = (TransactionManager) new InitialContext().lookup("java:/TransactionManager");
tm.begin();
MyEntity e = new MyEntity();
em.persist(e);
em.flush();
em.refresh(e);
tm.rollback();
refresh invocation seems to break cache consistency. If refresh is used just before rollback, there is a cache entry (you can see it thanks to following code)
tm.begin();
em.clear();
Session s = (Session)em.getDelegate();
SessionFactory sf = s.getSessionFactory();
Map cacheEntries = sf.getStatistics()
.getSecondLevelCacheStatistics("test")
.getEntries();
tm.commit();
Test done with a very simple entity + HashTableCacheProvider, so I guess the problem in is core or somewhere 'around' refresh implementation.