-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 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
-
Fix Version/s: EAP_EWP 5.1.1
-
Component/s: Hibernate
-
Labels:None
-
Affects:Release Notes
-
Workaround:Workaround Exists
-
Workaround Description:
-
Release Notes Text:
-
Release Notes Docs Status:Documented as Resolved Issue
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.